+ } else
+ $dec = 0;
+ if ($order->fixed_asset) {
+ hidden('qty', -1);
+ qty_cell(1, false, 0);
+ } else
+ label_cell( text_input('qty', get_post('qty', '0'), 15, 15, '', 'class="amount active" dec='.$dec), "nowrap align=right");
+
+ label_cell(get_post('units'), '', 'units');
+
+ if ($order->fixed_asset) {
+ hidden('std_cost');
+ label_cell($_POST['std_cost'], "nowrap align=right ", 'std_cost_view');
+ $price = get_purchase_value($_POST['stock_id']);
+ amount_cell($price, false, '', 'initial_price');
+ } else {
+ if (get_post('_qty_changed')) {
+ $Ajax->activate('items_table');
+ set_focus(input_num('qty') >= 0 ? 'std_cost' : 'AddItem');
+ }
+ if (input_num('qty') >= 0)
+ amount_cells(null, 'std_cost', null, null, null, $dec);
+ else {
+ hidden('std_cost');
+ label_cell($_POST['std_cost'], "nowrap align=right");
+ }
+ label_cell(" ");