X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fitem_codes.php;h=892c0a359d42a01520cb78d05a4bfa70ce616788;hb=4f00ab261af7ca4118aad47451c25bb80437dc4b;hp=a731d9ed5336078555ff2aeb6c0b2753753994e3;hpb=ebc600101ceab69c06eac4b1bd4d1782af45de05;p=fa-stable.git
diff --git a/inventory/manage/item_codes.php b/inventory/manage/item_codes.php
index a731d9ed..892c0a35 100644
--- a/inventory/manage/item_codes.php
+++ b/inventory/manage/item_codes.php
@@ -35,10 +35,10 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
display_error( _("There is no item selected."));
set_focus('stock_id');
}
- elseif (!check_num('quantity', 0))
+ elseif (!input_num('quantity'))
{
$input_error = 1;
- display_error( _("The price entered was not numeric."));
+ display_error( _("The price entered was not positive number."));
set_focus('quantity');
}
elseif ($_POST['description'] == '')
@@ -103,7 +103,9 @@ if (!isset($_POST['stock_id']))
$_POST['stock_id'] = get_global_stock_item();
echo "
" . _("Item:"). " ";
-echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
+//Chaitanya : 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 "
";
@@ -117,7 +119,7 @@ $dflt_cat = $result['category_id'];
$result = get_all_item_codes($_POST['stock_id']);
div_start('code_table');
- start_table("$table_style width=60%");
+ start_table(TABLESTYLE, "width=60%");
$th = array(_("EAN/UPC Code"), _("Quantity"), _("Units"),
_("Description"),_("Category"), "", "");
@@ -152,23 +154,24 @@ div_end();
//-----------------------------------------------------------------------------------------------
-if ($Mode =='Edit')
-{
- $myrow = get_item_code($selected_id);
- $_POST['item_code'] = $myrow["item_code"];
- $_POST['quantity'] = $myrow["quantity"];
- $_POST['description'] = $myrow["description"];
- $_POST['category_id'] = $myrow["category_id"];
-}
- else {
- $_POST['quantity'] = 1;
- $_POST['description'] = $dflt_desc;
- $_POST['category_id'] = $dflt_cat;
+if ($selected_id != '') {
+ if ($Mode =='Edit')
+ {
+ $myrow = get_item_code($selected_id);
+ $_POST['item_code'] = $myrow["item_code"];
+ $_POST['quantity'] = $myrow["quantity"];
+ $_POST['description'] = $myrow["description"];
+ $_POST['category_id'] = $myrow["category_id"];
+ }
+ hidden('selected_id', $selected_id);
+} else {
+ $_POST['quantity'] = 1;
+ $_POST['description'] = $dflt_desc;
+ $_POST['category_id'] = $dflt_cat;
}
echo "
";
-hidden('selected_id', $selected_id);
-start_table($table_style2);
+start_table(TABLESTYLE2);
hidden('code_id', $selected_id);