}
else
{ // Must be modifying an existing item
+ if (!isset($_POST['NewStockID'])) {
$_POST['NewStockID'] = $_POST['stock_id'];
$myrow = get_item($_POST['NewStockID']);
$_POST['no_sale'] = $myrow['no_sale'];
$_POST['del_image'] = 0;
$_POST['inactive'] = $myrow["inactive"];
- label_row(_("Item Code:"),$_POST['NewStockID']);
- hidden('NewStockID', $_POST['NewStockID']);
- set_focus('description');
+ }
+ label_row(_("Item Code:"),$_POST['NewStockID']);
+ hidden('NewStockID', $_POST['NewStockID']);
+ set_focus('description');
}
text_row(_("Name:"), 'description', null, 52, 50);