From 7da63db70a6ca210a46a9322d1f299ec663bb66d Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 27 May 2016 09:11:57 +0200 Subject: [PATCH] Tabbed dialogs allowed non access pages. --- inventory/manage/items.php | 14 ++++++++------ purchasing/manage/suppliers.php | 2 +- sales/manage/customers.php | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/inventory/manage/items.php b/inventory/manage/items.php index 07cfcfcd..5ac1f750 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -585,12 +585,14 @@ $tabs = (get_post('fixed_asset')) 'movement' => array(_('&Transactions'), $stock_id) ) : 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), - 'status' => array(_('&Status'), (is_inventory_item($stock_id) ? $stock_id : null)), + 'sales_pricing' => array(_('S&ales Pricing'), (user_check_access('SA_SALESPRICE') ? $stock_id : null)), + 'purchase_pricing' => array(_('&Purchasing Pricing'), (user_check_access('SA_PURCHASEPRICING') ? $stock_id : null)), + 'standard_cost' => array(_('Standard &Costs'), (user_check_access('SA_STANDARDCOST') ? $stock_id : null)), + 'reorder_level' => array(_('&Reorder Levels'), (is_inventory_item($stock_id) && + user_check_access('SA_REORDER') ? $stock_id : null)), + 'movement' => array(_('&Transactions'), (user_check_access('SA_ITEMSTRANSVIEW') ? $stock_id : null)), + 'status' => array(_('&Status'), $stock_id), + //'status' => array(_('&Status'), (user_check_access('SA_ITEMSSTATVIEW') ? $stock_id : null)), ); tabbed_content_start('tabs', $tabs); diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index d17950c4..4b675c8a 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -308,7 +308,7 @@ 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'), (user_check_access('SA_SUPPTRANSVIEW') ? $supplier_id : null)), 'orders' => array(_('Purchase &Orders'), $supplier_id), )); diff --git a/sales/manage/customers.php b/sales/manage/customers.php index 953d7762..a3e11c4d 100644 --- a/sales/manage/customers.php +++ b/sales/manage/customers.php @@ -349,7 +349,7 @@ if (!$selected_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'), (user_check_access('SA_SALESTRANSVIEW') ? $selected_id : null)), 'orders' => array(_('Sales &Orders'), $selected_id), )); -- 2.30.2