Cleanup: invalid transaction type constant used in get_counterparty_name()
[fa-stable.git] / sales / includes / db / payment_db.inc
index 81ea49ce6ba625f96639eeff9d388ad9612ecc2c..3fd0164bad6caa092a5e77a584366912f45f7fbb 100644 (file)
@@ -90,7 +90,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(ST_CUSTPAYMENT, $payment_no, $date_,     $charge_act, 0, 0, '', 
                        $charge, $bank['bank_curr_code'], PT_CUSTOMER,  $customer_id);
        }
@@ -166,4 +166,3 @@ function get_cust_bank_charge($type, $trans_no)
        return $myrow['0'];
 }
 
-?>
\ No newline at end of file