X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=reporting%2Frep710.php;h=9db53e60b46324e6c7d9fea9705f3063f2392a88;hb=51f9e62242aa3697a2d9350d6d1040d5c647c7a5;hp=b7852d61908b8dfe5bd79348f8915ba8444787b7;hpb=6a4d8e6c1e92ff1b8fc5abb3fae76fb1c1968550;p=fa-stable.git diff --git a/reporting/rep710.php b/reporting/rep710.php index b7852d61..9db53e60 100644 --- a/reporting/rep710.php +++ b/reporting/rep710.php @@ -80,7 +80,7 @@ function print_audit_trail() $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'right'); $usr = get_user($user); - $user_id = $usr['user_id']; + $user_id = isset($usr['user_id']) ? $usr['user_id'] : ""; $params = array( 0 => $comments, 1 => array('text' => _('Period'), 'from' => $from,'to' => $to), 2 => array('text' => _('Type'), 'from' => ($systype != -1 ? $systypes_array[$systype] : _('All')), 'to' => ''), @@ -89,12 +89,14 @@ function print_audit_trail() $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize(), 9, $orientation); if ($orientation == 'L') recalculate_cols($cols); + $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); $rep->NewPage(); $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']))); @@ -111,12 +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(); } -?> \ No newline at end of file