From ab6e80ccdc767b78bbb4a4a38190f16a77747feb Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 27 May 2016 09:09:22 +0200 Subject: [PATCH] Tabbed dialogs allowed non access pages. --- inventory/manage/items.php | 17 ++++++++++++----- purchasing/manage/suppliers.php | 3 ++- sales/manage/customers.php | 3 ++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/inventory/manage/items.php b/inventory/manage/items.php index ea831251..ceb556fe 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -452,12 +452,19 @@ if (!$stock_id) tabbed_content_start('tabs', array( 'settings' => array(_('&General settings'), $stock_id), - 'sales_pricing' => array(_('S&ales Pricing'), $stock_id), - 'purchase_pricing' => array(_('&Purchasing Pricing'), $stock_id), - 'standard_cost' => array(_('Standard &Costs'), $stock_id), - 'reorder_level' => array(_('&Reorder Levels'), (is_inventory_item($stock_id) ? $stock_id : null)), - 'movement' => array(_('&Transactions'), $stock_id), + 'sales_pricing' => array(_('S&ales Pricing'), + ($_SESSION["wa_current_user"]->can_access_page('SA_SALESPRICE') ? $stock_id : null)), + 'purchase_pricing' => array(_('&Purchasing Pricing'), + ($_SESSION["wa_current_user"]->can_access_page('SA_PURCHASEPRICING') ? $stock_id : null)), + 'standard_cost' => array(_('Standard &Costs'), + ($_SESSION["wa_current_user"]->can_access_page('SA_STANDARDCOST') ? $stock_id : null)), + 'reorder_level' => array(_('&Reorder Levels'), (is_inventory_item($stock_id) && + $_SESSION["wa_current_user"]->can_access_page('SA_REORDER') ? $stock_id : null)), + 'movement' => array(_('&Transactions'), + ($_SESSION["wa_current_user"]->can_access_page('SA_ITEMSTRANSVIEW') ? $stock_id : null)), 'status' => array(_('&Status'), $stock_id), + //'status' => array(_('&Status'), + // ($_SESSION["wa_current_user"]->can_access_page('SA_ITEMSSTATVIEW') ? $stock_id : null)), )); switch (get_post('_tabs_sel')) { diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index e5da178a..d3e3df36 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -306,7 +306,8 @@ if (!$supplier_id) tabbed_content_start('tabs', array( 'settings' => array(_('&General settings'), $supplier_id), 'contacts' => array(_('&Contacts'), $supplier_id), - 'transactions' => array(_('&Transactions'), $supplier_id), + 'transactions' => array(_('&Transactions'), + ($_SESSION["wa_current_user"]->can_access_page('SA_SUPPTRANSVIEW') ? $supplier_id : null)), 'orders' => array(_('Purchase &Orders'), $supplier_id), )); diff --git a/sales/manage/customers.php b/sales/manage/customers.php index 511e8fea..87953187 100644 --- a/sales/manage/customers.php +++ b/sales/manage/customers.php @@ -347,7 +347,8 @@ if (!$selected_id || list_updated('customer_id')) tabbed_content_start('tabs', array( 'settings' => array(_('&General settings'), $selected_id), 'contacts' => array(_('&Contacts'), $selected_id), - 'transactions' => array(_('&Transactions'), $selected_id), + 'transactions' => array(_('&Transactions'), + ($_SESSION["wa_current_user"]->can_access_page('SA_SALESTRANSVIEW') ? $selected_id : null)), 'orders' => array(_('Sales &Orders'), $selected_id), )); -- 2.30.2