aboutsummaryrefslogtreecommitdiffstats
path: root/en/about
diff options
context:
space:
mode:
Diffstat (limited to 'en/about')
-rw-r--r--en/about/reports/template_lib.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/en/about/reports/template_lib.php b/en/about/reports/template_lib.php
index 419ff103c..12282650c 100644
--- a/en/about/reports/template_lib.php
+++ b/en/about/reports/template_lib.php
@@ -11,9 +11,9 @@ function get_expenses($v)
$html .= sprintf('<thead><tr><th>%s</th><th>%s</th><th>%s</th><th class="money">%s</th></tr></thead><tbody>',
$line[0], $line[1],
- $line[2], $line[3],
+ $line[2], $line[3]/*,
$line[4],
- $line[5]);
+ $line[5]*/);
foreach ($v as $line) {
if (count($line) < 2)
@@ -25,6 +25,12 @@ function get_expenses($v)
_report_number_format($line[3]));
$cat = explode(':', $line[1]);
+ if(!isset($sums[$cat[0]])) {
+ $sums[$cat[0]] = 0;
+ }
+ if(!isset($sums['total'])) {
+ $sums['total'] = 0;
+ }
$sums[$cat[0]] += $line[3];
$sums['total'] += $line[3];
}
@@ -114,12 +120,12 @@ function get_revenues($v, $_months)
$line[1] > 0 ? _report_number_format($line[2] / $line[1]) : ''
);
- $sums['count'] += $line[1];
- $sums['total'] += $line[2];
- $sums['check'] += $line[3];
- $sums['xfer'] += $line[4];
- $sums['paypal'] += $line[5];
- $sums['cash'] += $line[6];
+ $sums['count'] += floatval(str_replace(',', '.', $line[1]));
+ $sums['total'] += floatval(str_replace(',', '.', $line[2]));
+ $sums['check'] += floatval(str_replace(',', '.', $line[3]));
+ $sums['xfer'] += floatval(str_replace(',', '.', $line[4]));
+ $sums['paypal'] += floatval(str_replace(',', '.', $line[5]));
+ $sums['cash'] += floatval(str_replace(',', '.', $line[6]));
}
$html .= '</tbody><tfoot>';
$html .= sprintf('<tr><th>Total</th>