From 2c2164f6e17101e8bbfe029d272ea0d5266d6ec4 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 22 Feb 2019 23:30:45 +0100 Subject: [PATCH] 4859: The Outstanding in Customer Balance is Not Ok with Journal Entry. Fixed by @boxygen. --- reporting/rep101.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reporting/rep101.php b/reporting/rep101.php index dc81dd5a..900678ad 100644 --- a/reporting/rep101.php +++ b/reporting/rep101.php @@ -239,7 +239,7 @@ function print_customer_balances() $item[2] = round2($trans['Allocated'] * $rate, $dec) * -1; } $rep->AmountCol(6, 7, $item[2], $dec); - if ($trans['type'] == ST_JOURNAL || $trans['type'] == ST_SALESINVOICE || $trans['type'] == ST_BANKPAYMENT) + if (($trans['type'] == ST_JOURNAL && $item[0]) || $trans['type'] == ST_SALESINVOICE || $trans['type'] == ST_BANKPAYMENT) $item[3] = $item[0] - $item[2]; else $item[3] = -$item[1] - $item[2]; -- 2.30.2