97555f5297410770e5595e79e7ef82be40fbd1de
[kivitendo-erp.git] / templates / webpages / do / stock_out_form.html
1 [%- USE T8 %]
2 [%- USE HTML %][%- USE LxERP %]
3 <body>
4
5  [%- IF delivered %]
6  [%- SET RO = ' readonly' %]
7  [%- END %]
8
9  <style type="text/css">
10   .tr_error {
11     background-color: #ffc9c9;
12   }
13  </style>
14
15  <form method="post" action="do.pl" name="Form">
16
17   <div class="listtop">[% title %]</div>
18
19   [%- IF ERRORS && ERRORS.size %]
20   <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
21   [%- END %]
22
23   <p>
24    <table>
25     <tr>
26      <td>[% 'Part Number' | $T8 %]</td>
27      <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
28     </tr>
29     <tr>
30      <td>[% 'Description' | $T8 %]</td>
31      <td>[% HTML.escape(PART_INFO.description) %]</td>
32     </tr>
33     <tr>
34      <td>[% 'Qty according to delivery order' | $T8 %]</td>
35      <td>[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]</td>
36     </tr>
37    </table>
38   </p>
39
40   [%- UNLESS WHCONTENTS.size %]
41   <p>[% 'There are no items in stock.' | $T8 %]</p>
42
43   <p><button type="button" onclick="window.close()">[% 'Close Window' | $T8 %]</button></p>
44
45   [%- ELSE %]
46
47   <input type="hidden" name="nextsub"   value="set_stock_out">
48   <input type="hidden" name="rowcount"  value="[% HTML.escape(WHCONTENTS.size) %]">
49   <input type="hidden" name="in_out"    value="out">
50   <input type="hidden" name="parts_id"  value="[% HTML.escape(parts_id) %]">
51   <input type="hidden" name="partunit"  value="[% HTML.escape(PART_INFO.unit) %]">
52   <input type="hidden" name="do_qty"    value="[% HTML.escape(do_qty) %]">
53   <input type="hidden" name="do_unit"   value="[% HTML.escape(do_unit) %]">
54   <input type="hidden" name="row"       value="[% HTML.escape(row) %]">
55   <input type="hidden" name="closed"    value="[% HTML.escape(closed) %]">
56   <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
57
58   <p>
59    <table>
60     <tr class="listheading">
61      <th class="listheading">&nbsp;</th>
62      <th class="listheading">[% 'Warehouse' | $T8 %]</th>
63      <th class="listheading">[% 'Bin' | $T8 %]</th>
64      <th class="listheading">[% 'Charge Number' | $T8 %]</th>
65      [% IF conf_show_best_before %]
66      <th class="listheading">[% 'Best Before' | $T8 %]</th>
67      [% END %]
68      [%- UNLESS delivered %]
69      <th align="right" class="listheading">[% 'Available qty' | $T8 %]</th>
70      [%- END %]
71      <th align="right" class="listheading">[% 'Qty' | $T8 %]</th>
72      <th align="right" class="listheading">[% 'Unit' | $T8 %]</th>
73     </tr>
74
75     [%- FOREACH row = WHCONTENTS %]
76     <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
77      <td>[% loop.count %]</td>
78      <td>[% HTML.escape(row.warehousedescription) %]</td>
79      <td>[% HTML.escape(row.bindescription) %]</td>
80      <td>[% HTML.escape(row.chargenumber) %]</td>
81      [% IF conf_show_best_before %]
82      <td>[% HTML.escape(row.bestbefore) %]</td>
83      [% END %]
84      [%- IF delivered %]
85
86      <td>[% HTML.escape(LxERP.format_amount(row.stock_qty)) %]</td>
87      <td>[% HTML.escape(row.stock_unit) %]</td>
88
89      [%- ELSE %]
90
91      <td>[% HTML.escape(row.available_qty) %]</td>
92      <td><input name="qty_[% loop.count %]" style="text-align: right;" size="12"
93                 [%- IF row.stock_qty %]
94                 value="[% HTML.escape(LxERP.format_amount(row.stock_qty)) %]"
95                 [%- ELSIF ((WHCONTENTS.size == 1) && (!row.stock_qty)) %]
96                 value="[% HTML.escape(do_qty) %]"
97                 [%- END %]
98                 ></td>
99      <td>
100       <select name="unit_[% loop.count %]">
101        [%- FOREACH unit = UNITS %]
102        <option[% IF unit.name == row.stock_unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
103        [%- END %]
104       </select>
105      </td>
106
107      [%- END %]
108     </tr>
109
110     <input type="hidden" name="warehouse_id_[% loop.count %]" value="[% HTML.escape(row.warehouse_id) %]">
111     <input type="hidden" name="bin_id_[% loop.count %]"       value="[% HTML.escape(row.bin_id) %]">
112     <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
113     [% IF conf_show_best_before %]
114     <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
115     [% END %]
116     [%- END %]
117    </table>
118   </p>
119
120   <hr size="3" noshade>
121
122   <p>
123    [%- IF delivered %]
124    <button type="button" class="submit" name="action" onclick="window.close()">[% 'Close Window' | $T8 %]</button>
125    [%- ELSE %]
126    <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
127    [%- END %]
128   </p>
129
130   [%- END %]
131  </form>
132
133 </body>
134