Korrekte Dortierung der Reports
Bernd Wurst

Bernd Wurst commited on 2018-01-09 05:42:27
Zeige 2 geänderte Dateien mit 4 Einfügungen und 4 Löschungen.

... ...
@@ -8,7 +8,7 @@ $title = 'Report';
8 8
 $year = date("Y")-1;
9 9
 
10 10
 $typeresult = db_query("SELECT id, description FROM buchhaltung.types");
11
-$dataresult = db_query("SELECT id, date, description, invoice_id, direction, type, amount, tax_rate, gross FROM buchhaltung.transactions WHERE date BETWEEN :from and :to", array(":from" => $year."-01-01", ":to" => $year."-12-31"));
11
+$dataresult = db_query("SELECT id, date, description, invoice_id, direction, type, amount, tax_rate, gross FROM buchhaltung.transactions WHERE date BETWEEN :from and :to ORDER BY date", array(":from" => $year."-01-01", ":to" => $year."-12-31"));
12 12
 
13 13
 $types = array();
14 14
 $data_by_type = array();
... ...
@@ -35,7 +35,7 @@ foreach ($types as $id => $t) {
35 35
         continue;
36 36
     }
37 37
     output("<h3>$t</h3>");
38
-    output("<table>");
38
+    output('<table style="font-size: 10pt;">');
39 39
     $umsatz19proz = 0.0;
40 40
     $umsatz0proz = 0.0;
41 41
     $umsatzandereproz = 0.0;
... ...
@@ -79,7 +79,7 @@ foreach ($types as $id => $t) {
79 79
     }
80 80
     $netsum = str_replace('.', ',', sprintf('%.2f €', $netsum));
81 81
     $ustsum = str_replace('.', ',', sprintf('%.2f €', $ustsum));
82
-    output("<tr><td colspan=\"2\" style=\"font-weight: bold;text-align: right;\">Summe dieser Kategorie:</td><td style=\"font-weight: bold;text-align: right;\">$netsum</td><td style=\"font-weight: bold;text-align: right;\">$ustsum</td><td></td></tr>\n");
82
+    output("<tr><td colspan=\"2\" style=\"font-weight: bold;text-align: right;\">Summe $t:</td><td style=\"font-weight: bold;text-align: right;\">$netsum</td><td style=\"font-weight: bold;text-align: right;\">$ustsum</td><td></td></tr>\n");
83 83
     output('</table>');
84 84
 }
85 85
 
... ...
@@ -8,7 +8,7 @@ $title = 'Report';
8 8
 $year = date("Y")-1;
9 9
 
10 10
 $typeresult = db_query("SELECT id, description FROM buchhaltung.types");
11
-$dataresult = db_query("SELECT id, date, description, invoice_id, direction, type, amount, tax_rate, gross FROM buchhaltung.transactions WHERE date BETWEEN :from and :to", array(":from" => $year."-01-01", ":to" => $year."-12-31"));
11
+$dataresult = db_query("SELECT id, date, description, invoice_id, direction, type, amount, tax_rate, gross FROM buchhaltung.transactions WHERE date BETWEEN :from and :to ORDER BY date", array(":from" => $year."-01-01", ":to" => $year."-12-31"));
12 12
 
13 13
 $types = array();
14 14
 $data = array();
15 15