From 0f166221e63d742558a4c6b382b5d9be274c5ff9 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 29 Aug 2017 17:01:23 +0200 Subject: [PATCH] Fixed Logical Bug in Customer Balances Report. --- reporting/rep101.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reporting/rep101.php b/reporting/rep101.php index 634b2d69..7b8e8f20 100644 --- a/reporting/rep101.php +++ b/reporting/rep101.php @@ -203,7 +203,13 @@ function print_customer_balances() } while ($trans = db_fetch($res)) { - if ($no_zeros && floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0) continue; + if ($no_zeros) { + if ($show_balance) { + if ($trans['TotalAmount'] == 0) continue; + } else { + if (floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0) continue; + } + } $rep->NewLine(1, 2); $rep->TextCol(0, 1, $systypes_array[$trans['type']]); $rep->TextCol(1, 2, $trans['reference']); -- 2.30.2