From: Joe Hunt Date: Fri, 20 Aug 2010 08:08:37 +0000 (+0000) Subject: Improvements to bank inquiry credit/debit totals as well. X-Git-Tag: v2.4.2~19^2~678 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=18ec5cabd96ec4e11dc1436f9a7ac034cadd3dbf;p=fa-stable.git Improvements to bank inquiry credit/debit totals as well. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f86d0f84..d8447ef1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +20-Aug-2010 Joe Hunt/Chaitanya ++ Improvements to bank inquiry credit/debit totals as well. +$ /gl/inquiry/bank_inquiry.php + 18-Aug-2010 Joe Hunt # View of backup scripts and attachments didn't work $ /admin/attachments.php diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index dddc9b47..65a691fd 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -70,14 +70,19 @@ table_header($th); $bfw = get_balance_before_for_bank_account($_POST['bank_account'], $_POST['TransAfterDate']); -start_row("class='inquirybg'"); -label_cell(""._("Opening Balance")." - ".$_POST['TransAfterDate']."", "colspan=4"); +$credit = $debit = 0; +start_row("class='inquirybg' style='font-weight:bold'"); +label_cell(_("Opening Balance")." - ".$_POST['TransAfterDate'], "colspan=4"); display_debit_or_credit_cells($bfw); label_cell(""); label_cell("", "colspan=2"); end_row(); $running_total = $bfw; +if ($bfw > 0 ) + $debit += $bfw; +else + $credit += $bfw; $j = 1; $k = 0; //row colour counter while ($myrow = db_fetch($result)) @@ -97,6 +102,10 @@ while ($myrow = db_fetch($result)) label_cell(payment_person_name($myrow["person_type_id"],$myrow["person_id"])); label_cell(get_gl_view_str($myrow["type"], $myrow["trans_no"])); end_row(); + if ($myrow["amount"] > 0 ) + $debit += $myrow["amount"]; + else + $credit += $myrow["amount"]; if ($j == 12) { @@ -107,9 +116,12 @@ while ($myrow = db_fetch($result)) } //end of while loop -start_row("class='inquirybg'"); -label_cell("" . _("Ending Balance")." - ". $_POST['TransToDate']. "", "colspan=4"); -display_debit_or_credit_cells($running_total); +start_row("class='inquirybg' style='font-weight:bold'"); +label_cell(_("Ending Balance")." - ". $_POST['TransToDate'], "colspan=4"); +amount_cell($debit); +amount_cell(-$credit); +//display_debit_or_credit_cells($running_total); +amount_cell($debit+$credit); label_cell(""); label_cell("", "colspan=2"); end_row();