1 #include <infocon.style>
5 <page func=InfoCon title="Kontoführung">
13 if ((strlen ($_GET['cur']) > 0) && ($_GET['cur'] == "dm")) {
14 $table = "account_dm";
16 $hidden = '<input type=hidden name=currency value="dm">';
17 $add = "¤cy=dm";
20 if (!isset($_GET['blzkto']) && isset($_GET['id'])) {
21 if ($table == 'account')
22 $accounting = new Accounting($_GET['id']);
24 $accounting = new AccountingDM($_GET['id']);
25 $row = $accounting->fetch();
28 $date = explode (" ", $row->datum);
29 $date = explode ("-", $date[0]);
30 $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
31 $blzkto = $row->blz_kto;
32 $add .= '&blzkto='. $blzkto;
35 $accounting = new Accounting(false);
36 $blzkto = $_GET['blzkto'];
38 $account = new AccountName($blzkto);
41 <style type="text/css">
51 background-color: #1aa2fe;
57 border: solid #1aa2fe;
64 border: solid #1aa2fe;
69 border: 1px solid #1aa2fe;
75 <h3 class=bar><?=$account->fetch()->name;?></h3>
77 <form method=post action="update.php">
78 <input class=none type="hidden" name="id" value="<? echo $_GET[id]; ?>">
80 echo ("<input class=\"none\" type=\"hidden\" name=\"blzkto\" value=\"$blzkto\">");
84 <label for=statement>Auszug</label>
85 <input id=statement name=statement size=15 maxlength=15 value="<?=$row->statement?>" tabindex=1>
88 <label for=datum>Datum</label>
89 <input id=datum name=datum size=15 maxlength=10 value="<?=$date?>" tabindex=2>
93 <label for=category>Kategorie</label>
94 <select id=category name=category tabindex=3>
97 foreach ($accounting->distinctCategories($blzkto) as $cat)
98 printf ("<option value=\"%s\"%s>%s", $cat->category, $cat->category == $row->category?" selected":"", $cat->category);
100 ?></select> <input id=category name=newcategory size=20 maxlength=50 value="" tabindex=4>
103 <label for=from_to>Abs./Empf.</label>
104 <select id=from_to name=from_to tabindex=5>
107 foreach ($accounting->distinctFromTo($blzkto, isset($_GET['id']) ? false : "datum >= now() - interval '2 years'") as $name)
108 printf ("<option value=\"%s\"%s>%s", $name->from_to, $name->from_to == $row->from_to?" selected":"", $name->from_to);
110 ?></select> <input id=from_to name=newfrom_to size=30 maxlength=120 value="" tabindex=6>
113 <label for=value>Betrag</label>
114 <input id=value name=value size=40 maxlength=20 value="<? echo $row->$value; ?>" tabindex=7>
117 <label for=descr>Verwendungszweck</label>
118 <textarea id=descr name=descr rows=5 cols=67 tabindex=8><? echo $row->descr; ?></textarea>
121 <? if (isset ($_GET[id])) { ?>
122 <input class=button type=submit value="Update" tabindex=9>
124 <input class=button type=submit value="Delete" name=delete tabindex=9>
126 <input class=button type=submit value="Insert" tabindex=9>
131 <h3 class=bar>Hinweise zur Bearbeitung</h3>
135 <li> Das Datum wird in der Form dd.mm.yyyy erwartet
137 <li> Wenn die Kategorie bzw. Absender/Empfänger noch nicht existieren,
138 werden diese manuell im Textfeld eingegeben
140 <li> Betrag als 999.44 angeben.
142 <li> Die erste Zeile des Verwendungszwecks wird in der Übersicht angezeigt