Add Items on the Fly. Behavior Changed in FA24. Fixed.
[fa-stable.git] / inventory / manage / items.php
index 07cfcfcd0faa45060b198d451b99f071b309aee8..77362bcfd0fc73f6b6e4fcab71bcba903c21cacc 100644 (file)
@@ -530,6 +530,7 @@ function item_settings(&$stock_id, $new_item)
        end_outer_table(1);
 
        div_start('controls');
+       if (@$_REQUEST['popup']) hidden('popup', 1);
        if (!isset($_POST['NewStockID']) || $new_item) 
        {
                submit_center('addupdate', _("Insert New Item"), true, '', 'default');
@@ -539,7 +540,7 @@ function item_settings(&$stock_id, $new_item)
                submit_center_first('addupdate', _("Update Item"), '', 
                        $page_nested ? true : 'default');
                submit_return('select', get_post('stock_id'), 
-                       _("Select this items and return to document entry."), 'default');
+                       _("Select this items and return to document entry."));
                submit('clone', _("Clone This Item"), true, '', true);
                submit('delete', _("Delete This Item"), true, '', true);
                submit_center_last('cancel', _("Cancel"), _("Cancel Edition"), 'cancel');
@@ -585,12 +586,13 @@ $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'), (user_check_access('SA_ITEMSSTATVIEW') ? $stock_id : null)),
        );
 
 tabbed_content_start('tabs', $tabs);