X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fdb%2Fpayment_db.inc;h=766648533351281e718ebcde127902624c4722e8;hb=a9d55e1c13cbd6a6305b9322ec8621a06516f9f3;hp=81ea49ce6ba625f96639eeff9d388ad9612ecc2c;hpb=1734935f14ed161f322431481ed483dd2274f464;p=fa-stable.git diff --git a/sales/includes/db/payment_db.inc b/sales/includes/db/payment_db.inc index 81ea49ce..76664853 100644 --- a/sales/includes/db/payment_db.inc +++ b/sales/includes/db/payment_db.inc @@ -34,10 +34,10 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou $company_record = get_company_prefs(); if ($trans_no != 0) { - delete_comments(ST_CUSTPAYMENT, $trans_no); - void_bank_trans(ST_CUSTPAYMENT, $trans_no, true); - void_gl_trans(ST_CUSTPAYMENT, $trans_no, true); - void_cust_allocations(ST_CUSTPAYMENT, $trans_no, $date_); + delete_comments(ST_CUSTPAYMENT, $trans_no); + void_bank_trans(ST_CUSTPAYMENT, $trans_no, true); + void_gl_trans(ST_CUSTPAYMENT, $trans_no, true); + void_cust_allocations(ST_CUSTPAYMENT, $trans_no, $date_); } $bank = get_bank_account($bank_account); @@ -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