Fixed Customer Balance Showing wrong Outstanding balance (Journal Entry allocation...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 22 Nov 2018 09:28:06 +0000 (10:28 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 22 Nov 2018 09:28:06 +0000 (10:28 +0100)
reporting/rep101.php

index 34c975ea98771145faabb99acb7fa35a4653dfcb..b9c3ad08304e286a33b7e298cb0b456c23053077 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_SALESINVOICE || $trans['type'] == ST_BANKPAYMENT)
+                       if ($trans['type'] == ST_JOURNAL || $trans['type'] == ST_SALESINVOICE || $trans['type'] == ST_BANKPAYMENT)
                                $item[3] = $item[0] - $item[2];
                        else    
                                $item[3] = -$item[1] - $item[2];