[0004212] Work Order Entry: fixed error when voided WO refence is reused.
[fa-stable.git] / purchasing / supplier_invoice.php
index e527a980b8fc39011d5012dcb17eaf2593cf4a18..080e8fc36f3d52fadf8e22becda73dc00b3db55c 100644 (file)
@@ -27,10 +27,6 @@ if (user_use_date_picker())
        $js .= get_js_date_picker();
 //----------------------------------------------------------------------------------------
 
-check_db_has_suppliers(_("There are no suppliers defined in the system."));
-
-//--------------------------------------------------------------------------------------------------
-
 if (isset($_GET['New']))
 {
        if (isset( $_SESSION['supp_trans']))
@@ -54,6 +50,8 @@ page($_SESSION['page_title'], false, false, "", $js);
 if (isset($_GET['ModifyInvoice']))
        check_is_editable(ST_SUPPINVOICE, $_GET['ModifyInvoice']);
 
+check_db_has_suppliers(_("There are no suppliers defined in the system."));
+
 //---------------------------------------------------------------------------------------------------------------
 
 if (isset($_GET['AddedID']))