Fix for exchange variation when allocating payments. re-inserted in System and GL...
[fa-stable.git] / sales / includes / db / payment_db.inc
index 5197a9965064e2a2f9c1f2be240c7ba5bdbe88e9..74054b06965669e886c5e6389b6fa44a6286a4cd 100644 (file)
@@ -13,10 +13,10 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou
            $customer_id, $branch_id, $date_, $ref, $amount, $discount);
 
        if ($trans_no != 0) {
-         delete_comments(12, $invoice_no);
-         void_bank_trans(12, $type_no, true);
+         delete_comments(12, $trans_no);
+         void_bank_trans(12, $trans_no, true);
          void_gl_trans(12, $trans_no, true);
-         void_cust_allocations(12, $trans_no);
+         void_cust_allocations(12, $trans_no, $date_);
        }
 
        /* Bank account entry first */