From: Joe Hunt Date: Fri, 22 Feb 2019 22:30:45 +0000 (+0100) Subject: 4859: The Outstanding in Customer Balance is Not Ok with Journal Entry. Fixed by... X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=2c2164f6e17101e8bbfe029d272ea0d5266d6ec4;hp=5ccab5d616a5e6174c0ad1aad9ae4d6369b5d3b8;p=fa-stable.git 4859: The Outstanding in Customer Balance is Not Ok with Journal Entry. Fixed by @boxygen. --- 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];