Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git] / templates / webpages / do / stock_out_form_master.html
index 3a13b87..e8f7a13 100644 (file)
@@ -60,6 +60,9 @@
      <th class="listheading"><translate>Warehouse</translate></th>
      <th class="listheading"><translate>Bin</translate></th>
      <th class="listheading"><translate>Charge Number</translate></th>
+     [% IF conf_show_best_before %]
+     <th class="listheading"><translate>Best Before</translate></th>
+     [% END %]
      [%- UNLESS delivered %]
      <th align="right" class="listheading"><translate>Available qty</translate></th>
      [%- END %]
@@ -73,7 +76,9 @@
      <td>[% HTML.escape(row.warehousedescription) %]</td>
      <td>[% HTML.escape(row.bindescription) %]</td>
      <td>[% HTML.escape(row.chargenumber) %]</td>
-
+     [% IF conf_show_best_before %]
+     <td>[% HTML.escape(row.bestbefore) %]</td>
+     [% END %]
      [%- IF delivered %]
 
      <td>[% HTML.escape(LxERP.format_amount(row.stock_qty)) %]</td>
 
      <td>[% HTML.escape(row.available_qty) %]</td>
      <td><input name="qty_[% loop.count %]" style="text-align: right;" size="12"
-                value="[% IF row.stock_qty %][% HTML.escape(LxERP.format_amount(row.stock_qty)) %][% END %]"></td>
+                [%- IF row.stock_qty %]
+                value="[% HTML.escape(LxERP.format_amount(row.stock_qty)) %]"
+                [%- ELSIF ((WHCONTENTS.size == 1) && (!row.stock_qty)) %]
+                value="[% HTML.escape(do_qty) %]"
+                [%- END %]
+                ></td>
      <td>
       <select name="unit_[% loop.count %]">
        [%- FOREACH unit = UNITS %]
     <input type="hidden" name="warehouse_id_[% loop.count %]" value="[% HTML.escape(row.warehouse_id) %]">
     <input type="hidden" name="bin_id_[% loop.count %]"       value="[% HTML.escape(row.bin_id) %]">
     <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
+    [% IF conf_show_best_before %]
+    <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
+    [% END %]
     [%- END %]
    </table>
   </p>