PHP 7.X produces A non-numeric value encountered in \includes\date_functions.inc...
[fa-stable.git] / reporting / rep101.php
index dc81dd5a4e4590ffcabe5ca6e24974032e42821b..900678ad7a9f6d62ad358c51a58bd43502ee0c3e 100644 (file)
@@ -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];