Fixed warnings related to empty item/customer/supplier selector in search modes.
[fa-stable.git] / inventory / prices.php
index a464e62e6000581119d6a7bea3fd44313be5caf6..7132eb624c7fab66153285b2cb4e8c6fd38b9445 100644 (file)
@@ -23,7 +23,10 @@ include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/inventory/includes/inventory_db.inc");
 
-page(_($help_context = "Inventory Item Sales prices"));
+$js = "";
+if ($SysPrefs->use_popup_windows && $SysPrefs->use_popup_search)
+       $js .= get_js_open_window(900, 500);
+page(_($help_context = "Inventory Item Sales prices"), false, false, "", $js);
 
 //---------------------------------------------------------------------------------------------------
 
@@ -197,7 +200,8 @@ if (!isset($_POST['price'])) {
 }
 
 $kit = get_item_code_dflts($_POST['stock_id']);
-small_amount_row(_("Price:"), 'price', null, '', _('per') .' '.$kit["units"]);
+$units = $kit ? $kit["units"] : '';
+small_amount_row(_("Price:"), 'price', null, '', _('per') .' '.$units);
 
 end_table(1);
 if ($calculated)