X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdb%2Fvoiding_db.inc;h=7f3ddc21c432d69b22da0cd518bc8ab407cf5799;hb=cf523b36717768b5c061accc95f3ba9083b88165;hp=86b452edb87d66ecc1623cd68058f1875b24f774;hpb=cd41af78f0d0f726d43b0f77303bed2a7939bb27;p=fa-stable.git diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index 86b452ed..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_SALES_INVOICE) + 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