From 2a80044afea0bf156f1d9061ac5287fada240a24 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 16 Nov 2020 08:54:34 +0100 Subject: [PATCH] Report Audit Trail. Added totals when type != -1. --- reporting/rep710.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reporting/rep710.php b/reporting/rep710.php index d0cb82bf..fdf1db84 100644 --- a/reporting/rep710.php +++ b/reporting/rep710.php @@ -96,6 +96,7 @@ function print_audit_trail() $trans = getTransactions($from, $to, $systype, $user); + $tot_amount = 0; while ($myrow=db_fetch($trans)) { $rep->TextCol(0, 1, sql2date(date("Y-m-d", $myrow['unix_stamp']))); @@ -112,11 +113,19 @@ function print_audit_trail() else $action = _('Closed'); $rep->TextCol(6, 7, $action); - if ($myrow['amount'] != null) + if ($myrow['amount'] != null) { $rep->AmountCol(7, 8, $myrow['amount'], $dec); + if ($systype != -1) + $tot_amount += $myrow['amount']; + } $rep->NewLine(1, 2); } $rep->Line($rep->row + 4); + if ($systype != -1) { + $rep->NewLine(1, 2); + $rep->TextCol(6, 7, _('Total')); + $rep->AmountCol(7, 8, $tot_amount, $dec); + } $rep->End(); } -- 2.30.2