When saving a Payment to a Customer in Bank Payments (normally payment to suppliers...
[fa-stable.git] / sales / includes / db / cust_trans_db.inc
index 7beb733cde6559b7e728c79d6d0900bc011a77c2..dbfa8572736ae656cadac0f059a61cade18898fb 100644 (file)
@@ -101,7 +101,9 @@ function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo,
                $SQLDueDate = "000-00-00";
        else
                $SQLDueDate = date2sql($due_date);
-
+       
+       if ($trans_type == systypes::bank_payment())
+               $Total = -$Total;
        if ($trans_no==0) {
        $trans_no = get_next_trans_no($trans_type);