- hidden('line_no', ($_SESSION['credit_items']->lines_on_order + 1));
- echo "<td colspan=2>";
- stock_items_list('stock_id', null, false, true);
- echo "</td>";
-
- $item_info = get_item_edit_info($_POST['stock_id']);
+ global $no_item_list;
+ if ($no_item_list)
+ {
+ echo "<td colspan=2>\n";
+ stock_items_list('stock_id', null, false, true);
+ echo "</td>\n";
+ }
+ else
+ {
+ text_cells(null, "StockID2", "", 12, 10, "", "", "onkeyup='recalcAccounts();' onKeyDown='if (event.keyCode==13) event.keyCode=9;' onblur='return setAccount(0, true);'");
+ stock_items_list_cells(null, 'stock_id', null, false, false, "onchange='return setAccount(1, true)'");
+ }
+ $item_info = get_item_edit_info($_POST['stock_id']);