Wrong type for AP Surf Set in demo data.
[fa-stable.git] / admin / void_transaction.php
index 13f1e439df8f7b7b2712dd007f61846a1fef6310..f6e97dcf6b9c44c05fd0d25ca8ca4beacbaaaa05 100644 (file)
@@ -73,7 +73,7 @@ function exist_transaction($type, $type_no)
                        return false;
 
                case ST_SUPPRECEIVE : // it's a GRN
-                       if (exists_grn($type_no))
+                       if (!exists_grn($type_no))
                                return false;
                        break;
 
@@ -250,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;
        }
@@ -290,7 +290,6 @@ function handle_void_transaction()
                        display_notification_centered(_("Selected transaction has been voided."));
                        unset($_POST['trans_no']);
                        unset($_POST['memo_']);
-                       unset($_POST['date_']);
                }
                else {
                        display_error($msg);
@@ -319,6 +318,7 @@ if (isset($_POST['ProcessVoiding']))
 if (isset($_POST['ConfirmVoiding']))
 {
        handle_void_transaction();
+       $selected_id = '';
        $Ajax->activate('_page_body');
 }