Fixed link bugs in sales order entry and optimized a couple of functions in ui_contro...
[fa-stable.git] / sales / includes / db / payment_db.inc
index 6f079fd7c957ac5ffe321b5fb2dc1b8ce0fd36d7..8ae5bdf3c1d3e0f4fd7227f1f80b11c0ce2fe70f 100644 (file)
@@ -73,7 +73,7 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou
 
        /*now enter the bank_trans entry */
        add_bank_trans(12, $payment_no, $bank_account, $ref,
-               $date_, $amount, payment_person_types::customer(), $customer_id,
+               $date_, $amount - $charge, payment_person_types::customer(), $customer_id,
                get_customer_currency($customer_id));
 
        add_comments(12, $payment_no, $date_, $memo_);