From b78392ab57cfb7bd683f69b3cb5bdc16f1655203 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 13 Nov 2017 14:51:30 +0100 Subject: [PATCH] White screen on Supplier Invoices and Supplier Credit Notes. Fixed. --- purchasing/supplier_credit.php | 4 ++-- purchasing/supplier_invoice.php | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/purchasing/supplier_credit.php b/purchasing/supplier_credit.php index 6bf9f22f..9335c1f1 100644 --- a/purchasing/supplier_credit.php +++ b/purchasing/supplier_credit.php @@ -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'])) diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index e527a980..080e8fc3 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -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'])) -- 2.30.2