X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fitem_codes.php;h=1881258c22593c9cc1c66a47c9bef3530946ca45;hb=2f3375b4493c1b1e0b17c2801298275f22f8d76e;hp=236ac79592bfe482ff912632149c6b71e297ae06;hpb=95ff74b5722826544743a01daf527aa3c9efe11a;p=fa-stable.git
diff --git a/inventory/manage/item_codes.php b/inventory/manage/item_codes.php
index 236ac795..1881258c 100644
--- a/inventory/manage/item_codes.php
+++ b/inventory/manage/item_codes.php
@@ -113,11 +113,15 @@ 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');
@@ -177,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);