From: Joe Date: Thu, 3 Nov 2022 16:07:42 +0000 (+0100) Subject: Secon Rerun of voiding Customer Payment. Of course test for type first. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=4bd7da3c640207f8c74a50377f9aa3f76338be60 Secon Rerun of voiding Customer Payment. Of course test for type first. --- diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index b3bba8b6..7f3ddc21 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -45,7 +45,7 @@ function void_transaction($type, $type_no, $date_, $memo_) if (!check_void_bank_trans($type, $type_no)) return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.'); case ST_SALESINVOICE : // it's a customer invoice - if (is_cust_invoice_credited($type_no) && $type == ST_SALESINVOICE) + if ($type == ST_SALESINVOICE && is_cust_invoice_credited($type_no)) return _('This invoice cannot be voided because it was already credited.'); case ST_CUSTCREDIT : // it's a customer credit note case ST_CUSTDELIVERY : // it's a customer dispatch