Tabbed dialogs allowed non access pages.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 27 May 2016 07:09:22 +0000 (09:09 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 27 May 2016 07:09:22 +0000 (09:09 +0200)
inventory/manage/items.php
purchasing/manage/suppliers.php
sales/manage/customers.php

index ea83125144d8db62d5cf5f90bf7e85805be55f45..ceb556fecaade6fc1164486ce43087df71502a51 100644 (file)
@@ -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')) {
index e5da178a8ac6d52b3c6084650215e96df5f64dc3..d3e3df360f7da452e65e149067e126c7f36bded2 100644 (file)
@@ -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),
        ));
        
index 511e8feab60b595e64a7034717f28876620b0cd3..87953187dd25869c18b6d0a5b2f03011d100df90 100644 (file)
@@ -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),
        ));