projects
/
infodrom.org
/
service.infodrom.org
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a67461e
)
Display booking date as well
author
Joey Schulze
<joey@infodrom.org>
Wed, 4 May 2016 17:23:42 +0000
(19:23 +0200)
committer
Joey Schulze
<joey@infodrom.org>
Wed, 4 May 2016 17:23:42 +0000
(19:23 +0200)
src/InfoCon/buch/list.wml
patch
|
blob
|
history
diff --git
a/src/InfoCon/buch/list.wml
b/src/InfoCon/buch/list.wml
index
faa6f04
..
422c179
100644
(file)
--- a/
src/InfoCon/buch/list.wml
+++ b/
src/InfoCon/buch/list.wml
@@
-15,8
+15,9
@@
if ($_POST["submit"] == "List") {
<table class="smallfont border" width=100% border=0 cellpadding=1 cellspacing=1>
<tr class="head">
<th width=10%>Datum</th>
<table class="smallfont border" width=100% border=0 cellpadding=1 cellspacing=1>
<tr class="head">
<th width=10%>Datum</th>
+ <th width=10%>Buchung</th>
<th width=10%>Kategorie</th>
<th width=10%>Kategorie</th>
- <th width=
7
0%>Verwendungszweck</th>
+ <th width=
6
0%>Verwendungszweck</th>
<th width=10%>Betrag</th>
</tr>
<?
<th width=10%>Betrag</th>
</tr>
<?
@@
-35,7
+36,7
@@
if ($_POST["submit"] == "List") {
$where[] = "price < 0.0";
}
$where[] = "price < 0.0";
}
- $query = "SELECT date,oid,category,description,price FROM $table ";
+ $query = "SELECT date,
billing_date,
oid,category,description,price FROM $table ";
if (count($where) > 0) {
$query .= " WHERE " . implode ($where, " AND ");
}
if (count($where) > 0) {
$query .= " WHERE " . implode ($where, " AND ");
}
@@
-51,11
+52,16
@@
if ($_POST["submit"] == "List") {
# $date = explode ("-", $date[0]);
# $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
$date = substr ($row['date'],6,2) . "." . substr ($row['date'],4,2) . "." . substr ($row['date'],0,4);
# $date = explode ("-", $date[0]);
# $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
$date = substr ($row['date'],6,2) . "." . substr ($row['date'],4,2) . "." . substr ($row['date'],0,4);
+ if ($row['billing_date'])
+ $billing_date = substr ($row['billing_date'],8,2) . "." . substr ($row['billing_date'],5,2) . "." . substr ($row['billing_date'],0,4);
+ else
+ $billing_date = ' ';
printf ("<tr class=\"t%d\">", $color);
printf ("<td width=\"10%%\" align=\"right\">%s</td>", $date);
printf ("<tr class=\"t%d\">", $color);
printf ("<td width=\"10%%\" align=\"right\">%s</td>", $date);
+ printf ("<td width=\"10%%\" align=\"right\">%s</td>", $billing_date);
printf ("<td width=\"10%%\" align=\"center\">%s</td>", $row['category']);
printf ("<td width=\"10%%\" align=\"center\">%s</td>", $row['category']);
- printf ("<td width=\"
7
0%%\"><a href=\"edit.php?oid=%d\">%s</a></td>",
+ printf ("<td width=\"0%%\"><a href=\"edit.php?oid=%d\">%s</a></td>",
$row['oid'], $row['description']);
printf ("<td width=\"10%%\" align=\"right\">%5.2f</td>", $row['price']);
$sum += $row['price'];
$row['oid'], $row['description']);
printf ("<td width=\"10%%\" align=\"right\">%5.2f</td>", $row['price']);
$sum += $row['price'];
@@
-63,7
+69,7
@@
if ($_POST["submit"] == "List") {
$color = !$color;
}
printf ("<tr class=\"t%d\">", $color);
$color = !$color;
}
printf ("<tr class=\"t%d\">", $color);
- echo ("<td width=\"85%\" colspan=\"
3
\"><b>Summe</b></td>");
+ echo ("<td width=\"85%\" colspan=\"
4
\"><b>Summe</b></td>");
printf ("<td width=\"15%%\" align=\"right\"><b>%5.2f</b></td>", $sum);
echo ("</tr>");
echo ("</table>");
printf ("<td width=\"15%%\" align=\"right\"><b>%5.2f</b></td>", $sum);
echo ("</tr>");
echo ("</table>");