6  [%- SET RO = ' readonly' %]
 
  11    <td>[% 'Part Number' | $T8 %]</td>
 
  12    <td>[% part.partnumber | html %]</td>
 
  15    <td>[% 'Description' | $T8 %]</td>
 
  16    <td>[% part.description | html %]</td>
 
  19    <td>[% 'Qty according to delivery order' | $T8 %]</td>
 
  20    <td>[% LxERP.format_amount(do_qty) %] [% do_unit | html %]</td>
 
  24   [%- UNLESS WHCONTENTS.size %]
 
  25   <p>[% 'There are no items in stock.' | $T8 %]</p>
 
  28   [% L.hidden_tag("in_out", in_out) %]
 
  29   [% L.hidden_tag("parts_id", parts_id) %]
 
  30   [% L.hidden_tag("do_qty", do_qty) %]
 
  31   [% L.hidden_tag("do_unit", do_unit) %]
 
  32   [% L.hidden_tag("row", row, class="data-row") %]
 
  33   [% L.hidden_tag("item_id", item_id) %]
 
  36    <table id="stock-in-out-table">
 
  37     <tr class="listheading">
 
  39      <th>[% 'Warehouse' | $T8 %]</th>
 
  40      <th>[% 'Bin' | $T8 %]</th>
 
  41      <th>[% 'Charge Number' | $T8 %]</th>
 
  42      [% IF INSTANCE_CONF.get_show_bestbefore %]
 
  43      <th>[% 'Best Before' | $T8 %]</th>
 
  45      [%- UNLESS delivered %]
 
  46      <th align="right">[% 'Available qty' | $T8 %]</th>
 
  48      <th align="right">[% 'Qty' | $T8 %]</th>
 
  49      <th align="right">[% 'Unit' | $T8 %]</th>
 
  52     [%- FOREACH row = WHCONTENTS %]
 
  53     <tr [% IF row.stock_error %] class="error"[% ELSE %]class="listrow"[% END %]>
 
  54      <td>[% loop.count %]</td>
 
  55      <td>[% row.warehousedescription | html %]</td>
 
  56      <td>[% row.bindescription | html %]</td>
 
  57      <td>[% row.chargenumber | html %]</td>
 
  58      [% IF INSTANCE_CONF.get_show_bestbefore %]
 
  59      <td>[% row.bestbefore | html %]</td>
 
  64      <td>[% LxERP.format_amount(row.stock_qty) | html %]</td>
 
  66       [% row.stock_unit | html %]
 
  67       [% L.hidden_tag("unit", row.stock_unit, class="data-unit") %]
 
  72      <td>[% row.available_qty | html %]</td>
 
  74       [% L.input_tag("qty", row.stock_qty                              ? LxERP.format_amount(row.stock_qty)
 
  75                           : (WHCONTENTS.size == 1) && (!row.stock_qty) ? LxERP.format_amount(do_qty)
 
  76                           : "", class="numeric data-qty", size="12") %]</td>
 
  77      <td>[% L.select_tag("unit_" _ loop.count, part.unit_obj.convertible_units, value_key="name", default=row.stock_unit, class="data-unit") %]</td>
 
  80      <td style="display:none">
 
  81       [% L.hidden_tag("warehouse_id", row.warehouse_id, class="data-warehouse-id") %]
 
  82       [% L.hidden_tag("bin_id", row.bin_id, class="data-bin-id") %]
 
  83       [% L.hidden_tag("chargenumber", row.chargenumber, class="data-chargenumber") %]
 
  84       [% L.hidden_tag("delivery_order_items_stock_id", row.delivery_order_items_stock_id, class="data-stock-id") %]
 
  85       [% L.hidden_tag("bestbefore", row.bestbefore, class="data-bestbefore") IF INSTANCE_CONF.get_show_bestbefore %]
 
  95   <p>[% L.button_tag('kivi.DeliveryOrder.save_updated_stock()', LxERP.t8('Save')) IF !delivered %]</p>