From: Joe Hunt Date: Fri, 15 Oct 2010 15:30:39 +0000 (+0000) Subject: [0000265] Changed Report List of Journal Entries to include balances. X-Git-Tag: v2.4.2~19^2~563 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ead9e4537a95ddc691750715bb8c38ee310e7b9b;p=fa-stable.git [0000265] Changed Report List of Journal Entries to include balances. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2d740ce8..fa846a1c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -20,8 +20,10 @@ Legend: $ -> Affected files 15-Oct-2010 Joe Hunt -# Customer Credit Note didn't update units when shifting items. +# [0000263] Customer Credit Note didn't update units when shifting items. $ /sales/includes/ui/sales_credit_ui.inc +! [0000265] Changed Report List of Journal Entries to include balances. +$ /reporting/rep702.php 14-Oct-2010 Joe Hunt # Check for empty class ID and better test for type/account id/name. diff --git a/reporting/rep702.php b/reporting/rep702.php index 5a05470b..c71daca6 100644 --- a/reporting/rep702.php +++ b/reporting/rep702.php @@ -71,13 +71,19 @@ function print_list_of_journal_entries() $trans = get_gl_transactions($from, $to, -1, null, 0, 0, $systype); $typeno = $type = 0; + $debit = $credit = 0.0; while ($myrow=db_fetch($trans)) { if ($type != $myrow['type'] || $typeno != $myrow['type_no']) { if ($typeno != 0) { - $rep->Line($rep->row + 4); + $rep->Line($rep->row += 6); + $rep->NewLine(); + $rep->AmountCol(4, 5, $debit, $dec); + $rep->AmountCol(5, 6, abs($credit), $dec); + $debit = $credit = 0.0; + $rep->Line($rep->row -= 4); $rep->NewLine(); } $typeno = $myrow['type_no']; @@ -106,10 +112,14 @@ function print_list_of_journal_entries() $dim_str .= "/".$dim_str2; $rep->TextCol(2, 3, $dim_str); $rep->TextCol(3, 4, $myrow['memo_']); - if ($myrow['amount'] > 0.0) + if ($myrow['amount'] > 0.0) { + $debit += $myrow['amount']; $rep->AmountCol(4, 5, abs($myrow['amount']), $dec); - else + } + else { + $credit += $myrow['amount']; $rep->AmountCol(5, 6, abs($myrow['amount']), $dec); + } $rep->NewLine(1, 2); } $rep->Line($rep->row + 4);