{
$already_on_order = 0;
- foreach ($order->line_items as $order_item)
+ foreach ($order->line_items as $order_item)
{
- if (strcasecmp($order_item->stock_id, $new_item) == 0)
+ if (strcasecmp($order_item->stock_id, $new_item) == 0)
{
$already_on_order = 1;
display_error(_("For Part :") . $new_item . " " . "This item is already on this order. You can change the quantity ordered of the existing line if necessary.");
echo "<table>";
- ref_row(_("Reference:"), 'ref', references::get_next(systypes::location_transfer()));
+ ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::location_transfer()));
date_row(_("Date:"), 'AdjDate');
$subtotal = 0;
$k = 0; //row colour counter
- foreach ($order->line_items as $stock_item)
+ foreach ($order->line_items as $stock_item)
{
$quantity = number_format2($stock_item->quantity,user_qty_dec());
label_cell("<a target='_blank' href='$path_to_root/inventory/inquiry/stock_status.php?" . SID . "stock_id=" . $stock_item->stock_id . "'>$stock_item->stock_id</a>");
label_cell($stock_item->item_description);
- label_cell($quantity, "nowrap align=right");
+ qty_cell($stock_item->quantity, false, get_qty_dec($stock_item->stock_id));
label_cell($stock_item->units);
edit_link_cell(SID . "Edit=$stock_item->stock_id");
delete_link_cell(SID . "Delete=$stock_item->stock_id");
end_row();
- }
- else
+ }
+ else
{
transfer_edit_item_controls($order, $stock_item->stock_id);
}
if (!isset($_POST['stock_id']))
$_POST['stock_id'] = $order->line_items[$stock_id]->stock_id;
if (!isset($_POST['qty']) || $_POST['qty'] == '')
- $_POST['qty'] = qty_format($order->line_items[$stock_id]->quantity);
+ $_POST['qty'] = qty_format($order->line_items[$stock_id]->quantity, $order->line_items[$stock_id]->stock_id, $dec);
$_POST['units'] = $order->line_items[$stock_id]->units;
else
{
echo "<TD colspan=2>";
- stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
+ stock_costable_items_list('stock_id', null, false, true);
echo "</TD>";
$item_info = get_item_edit_info($_POST['stock_id']);
- $_POST['qty'] = qty_format(0);
+ $_POST['qty'] = qty_format(0, $_POST['stock_id'], $dec);
$_POST['units'] = $item_info["units"];
}
- small_amount_cells(null, 'qty', $_POST['qty']);
+ small_qty_cells(null, 'qty', $_POST['qty'], null, null, $dec);
label_cell($_POST['units']);
- if (isset($_GET['Edit']))
+ if (isset($_GET['Edit']))
{
submit_cells('UpdateItem', _("Update"));
submit_cells('CancelItemChanges', _("Cancel"));
- }
- else
+ }
+ else
{
submit_cells('AddItem', _("Add Item"), "colspan=2");
}