White screen on Supplier Invoices and Supplier Credit Notes. Fixed.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 13 Nov 2017 13:51:30 +0000 (14:51 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 13 Nov 2017 13:51:30 +0000 (14:51 +0100)
purchasing/supplier_credit.php
purchasing/supplier_invoice.php

index 6bf9f22f1e92f6016060dd3801119b78173c6324..9335c1f1e81348ceb72e96cda1858cd3698264ce 100644 (file)
@@ -28,8 +28,6 @@ if (user_use_date_picker())
 
 //----------------------------------------------------------------------------------------
 
-check_db_has_suppliers(_("There are no suppliers defined in the system."));
-
 if (isset($_GET['ModifyCredit']))
        check_is_editable(ST_SUPPINVOICE, $_GET['ModifyCredit']);
 
@@ -64,6 +62,8 @@ if (isset($_GET['New']))
 }
 page($_SESSION['page_title'], false, false, "", $js);
 
+check_db_has_suppliers(_("There are no suppliers defined in the system."));
+
 //---------------------------------------------------------------------------------------------------------------
 
 if (isset($_GET['AddedID'])) 
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']))