Temporary fixes for php encoding library bugs ending with segfault.
[fa-stable.git] / admin / void_transaction.php
index af44b391851207ef62e7c19792141c12f1e65b5f..3016e88d9bf2643dfffe35eaa487ac10109be939 100644 (file)
@@ -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;
        }