X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fitem_codes.php;h=1881258c22593c9cc1c66a47c9bef3530946ca45;hb=26d7ae434469ae407f209ae3c0d3955b29107d95;hp=ffbd942c0192caf5ad9b99ce5f96047982ea0db4;hpb=cfd800ee093a96e799d53ad4a2c8ccb85c6f17cb;p=fa-stable.git
diff --git a/inventory/manage/item_codes.php b/inventory/manage/item_codes.php
index ffbd942c..1881258c 100644
--- a/inventory/manage/item_codes.php
+++ b/inventory/manage/item_codes.php
@@ -13,7 +13,11 @@ $page_security = 'SA_FORITEMCODE';
$path_to_root = "../..";
include_once($path_to_root . "/includes/session.inc");
-page(_($help_context = "Foreign Item Codes"));
+$js = "";
+if ($SysPrefs->use_popup_windows && $SysPrefs->use_popup_search)
+ $js .= get_js_open_window(900, 500);
+
+page(_($help_context = "Foreign Item Codes"), false, false, "", $js);
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
@@ -102,19 +106,22 @@ if (!isset($_POST['stock_id']))
$_POST['stock_id'] = get_global_stock_item();
echo "
" . _("Item:"). " ";
-//Chaitanya : Manufcatured item visible
+//Manufcatured item visible
echo stock_items_list('stock_id', $_POST['stock_id'], false, true);
-//echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
echo "
";
set_global_stock_item($_POST['stock_id']);
+$units = $dec = '';
$result = get_item_code_dflts($_POST['stock_id']);
-$dec = $result['decimals'];
-$units = $result['units'];
-$dflt_desc = $result['description'];
-$dflt_cat = $result['category_id'];
+if ($result) {
+ $dec = $result['decimals'];
+ $units = $result['units'];
+ $dflt_desc = $result['description'];
+ $dflt_cat = $result['category_id'];
+}
+
$result = get_all_item_codes($_POST['stock_id']);
div_start('code_table');
@@ -174,7 +181,7 @@ start_table(TABLESTYLE2);
hidden('code_id', $selected_id);
-text_row(_("UPC/EAN code:"), 'item_code', null, 20, 21);
+text_row(_("UPC/EAN code:"), 'item_code', null, 20, 20);
qty_row(_("Quantity:"), 'quantity', null, '', $units, $dec);
text_row(_("Description:"), 'description', null, 50, 200);
stock_categories_list_row(_("Category:"), 'category_id', null);