X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fvoid_transaction.php;h=7511a85d1ab51da30c17aa9574598c730914925d;hb=3f5a61dd5f2abfbaa853c6777c95ea8e780e6472;hp=af44b391851207ef62e7c19792141c12f1e65b5f;hpb=d1babda7c01b314d35fb89f2d195553b55936532;p=fa-stable.git diff --git a/admin/void_transaction.php b/admin/void_transaction.php index af44b391..7511a85d 100644 --- a/admin/void_transaction.php +++ b/admin/void_transaction.php @@ -73,7 +73,7 @@ function exist_transaction($type, $type_no) return false; case ST_SUPPRECEIVE : // it's a GRN - if (exists_grn_on_invoices($type_no)) + if (!exists_grn($type_no)) return false; break; @@ -104,7 +104,6 @@ function exist_transaction($type, $type_no) return false; case ST_COSTUPDATE : // it's a stock cost update return false; - break; } return true; @@ -241,7 +240,7 @@ function check_valid_entries() { display_error(_("The selected transaction was closed for edition and cannot be voided.")); set_focus('trans_no'); - return; + return false; } if (!is_date($_POST['date_'])) { @@ -251,7 +250,7 @@ function check_valid_entries() } if (!is_date_in_fiscalyear($_POST['date_'])) { - display_error(_("The entered date is not in fiscal year.")); + display_error(_("The entered date is out of fiscal year or is closed for further data entry.")); set_focus('date_'); return false; } @@ -320,6 +319,7 @@ if (isset($_POST['ProcessVoiding'])) if (isset($_POST['ConfirmVoiding'])) { handle_void_transaction(); + $selected_id = ''; $Ajax->activate('_page_body'); }