From 0f06e4320d00eaf3703b29fc04d42b7f75bc7378 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 6 Sep 2009 11:41:13 +0000 Subject: [PATCH] Changed so total in bank payments/deposits shows correctly if negative amount are entered. --- CHANGELOG.txt | 2 ++ gl/includes/ui/gl_bank_ui.inc | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0ce4cb3..7a2bedd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,8 @@ $ -> Affected files 05-Sep-2009 Joe Hunt # Changed Class Type to Class Name in GL Account groups $ /gl/manage/gl_account_types.php +# Changed so total in bank payments/deposits shows correctly if negative amount are entered. +$ /gl/includes/ui/gl_bank_ui.inc 30-Aug-2009 Janusz Dobrowolski # Fixed sql error during sales order line update with line cancelation. diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index ee3af80..3a22184 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -168,8 +168,12 @@ function display_gl_items($title, &$order) gl_edit_item_controls($order, $dim); if ($order->count_gl_items()) - label_row(_("Total"), number_format2(abs($order->gl_items_total()), user_price_dec()),"colspan=" . $colspan . " align=right", "align=right",3); - + { + $total = $order->gl_items_total(); + if ($order->trans_type == systypes::bank_deposit()) + $total *= -1; + label_row(_("Total"), number_format2($total, user_price_dec()),"colspan=" . $colspan . " align=right", "align=right",3); + } end_table(); div_end(); } -- 2.30.2