Items: fixed item tax type selector to exclude inactive item tax types.
[fa-stable.git] / inventory / manage / items.php
index 77362bcfd0fc73f6b6e4fcab71bcba903c21cacc..8ed29d2cb0bdaf7f484d86a3c7d8618f3c4fde71 100644 (file)
@@ -391,7 +391,8 @@ function item_settings(&$stock_id, $new_item)
        $fresh_item = !isset($_POST['NewStockID']) || $new_item 
                || check_usage($_POST['stock_id'],false);
 
-       item_tax_types_list_row(_("Item Tax Type:"), 'tax_type_id', null);
+       // show inactive item tax type in selector only if already set.
+  item_tax_types_list_row(_("Item Tax Type:"), 'tax_type_id', null, !$new_item && item_type_inactive(get_post('tax_type_id')));
 
        if (!get_post('fixed_asset'))
                stock_item_types_list_row(_("Item Type:"), 'mb_flag', null, $fresh_item);