X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fdb%2Fpayment_db.inc;h=9560179f1b7131e2b7e82c1144604f319a392289;hb=947c0dddc6cb94572e1f0cafe6d8c5663c00d695;hp=3fd0164bad6caa092a5e77a584366912f45f7fbb;hpb=17b390efcf904072b02ec866b2a427490471a260;p=fa-stable.git diff --git a/sales/includes/db/payment_db.inc b/sales/includes/db/payment_db.inc index 3fd0164b..9560179f 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); @@ -78,14 +78,12 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou if (($discount + $amount) != 0) { /* Now Credit Debtors account with receipts + discounts */ $total += add_gl_trans_customer(ST_CUSTPAYMENT, $payment_no, $date_, - $debtors_account, 0, 0, -($discount + $amount), $customer_id, - "Cannot insert a GL transaction for the debtors account credit"); + $debtors_account, 0, 0, -($discount + $amount), $customer_id); } if ($discount != 0) { /* Now Debit discount account with discounts allowed*/ $total += add_gl_trans_customer(ST_CUSTPAYMENT, $payment_no, $date_, - $discount_account, 0, 0, $discount, $customer_id, - "Cannot insert a GL transaction for the payment discount debit"); + $discount_account, 0, 0, $discount, $customer_id); } if ($charge != 0) {