0001503: Request - fee account included in bank account table
[fa-stable.git] / sales / includes / db / payment_db.inc
index abee06b68bfb0c18ef567e6e8189d7dc868b19a8..baabf0fed5623c83f2fe7ec010981226ba25d745 100644 (file)
@@ -72,7 +72,7 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou
 
        if ($charge != 0)       {
                /* Now Debit bank charge account with charges */
-               $charge_act = get_company_pref('bank_charge_act');
+               $charge_act = get_bank_charge_account($bank_account);
                $total += add_gl_trans_customer(ST_CUSTPAYMENT, $payment_no, $date_,
                        $charge_act, 0, 0, $charge, $customer_id,
                        "Cannot insert a GL transaction for the payment bank charge debit", $rate);