Templates werden nicht mehr übersetzt gespeichert.
[kivitendo-erp.git] / templates / webpages / wh / transfer_parts_selection_master.html
1 [%- USE T8 %]
2 [% USE HTML %][% USE JavaScript %]<body onload="on_load();">
3
4  <script type="text/javascript">
5   <!--
6       warehouses = new Array();
7       [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
8       warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
9       [% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
10       [% END %]
11       [% END %]
12
13       function warehouse_selected(row, index) {
14         var cname = "dst_bin_id_" + row;
15         var control = document.getElementById(cname);
16
17         for (var i = control.options.length - 1; i >= 0; i--) {
18           control.options[i] = null;
19         }
20
21         for (i = 0; i < warehouses[index].length; i++) {
22           control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
23         }
24
25         control.options[0].selected = true;
26       }
27
28       function on_load() {
29         [% FOREACH row = CONTENTS %]
30         warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
31         [% END %]
32       }
33     -->
34  </script>
35
36  <form method="post" action="wh.pl">
37
38   <input type="hidden" name="nextsub" value="transfer_parts">
39   <input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
40
41   <div class="listtop">[% title %]</div>
42
43   <p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
44
45   <p>
46    <table>
47     <tr>
48      <td>[% 'Select type of transfer' | $T8 %]:</td>
49      <td>
50       <select name="transfer_type_id">
51        [%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %]
52       </select>
53      </td>
54     </tr>
55
56     <tr>
57      <td>[% 'Optional comment' | $T8 %]:</td>
58      <td><input name="comment" size="20"></td>
59     </tr>
60    </table>
61   </p>
62
63   <p>
64    <table>
65     <tr>
66      <th class="listheading">[% 'Source bin' | $T8 %]</th>
67      <th class="listheading">[% 'Part Number' | $T8 %]</th>
68      <th class="listheading">[% 'Part Description' | $T8 %]</th>
69      <th class="listheading">[% 'Charge Number' | $T8 %]</th>
70      [% IF conf_show_best_before %]
71      <th class="listheading">[% 'Best Before' | $T8 %]</th>
72      [% END %]
73      <th class="listheading">[% 'EAN' | $T8 %]</th>
74      <th class="listheading">[% 'Available qty' | $T8 %]</th>
75      <th class="listheading" colspan="2">[% 'Transfer qty' | $T8 %]</th>
76      <th class="listheading" colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
77     </tr>
78
79     [% FOREACH row = CONTENTS %]
80     <tr class="listrow[% loop.count % 2 %]">
81      <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
82      <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
83      <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
84      <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
85      <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
86      [% IF conf_show_best_before %]
87      <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
88      [% END %]
89      <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
90      <td>[% HTML.escape(row.bindescription) %]</td>
91      <td>[% HTML.escape(row.partnumber) %]</td>
92      <td>[% HTML.escape(row.partdescription) %]</td>
93      <td>[% HTML.escape(row.chargenumber) %]</td>
94      [% IF conf_show_best_before %]
95      <td>[% HTML.escape(row.bestbefore) %]</td>
96      [% END %]
97      <td>[% HTML.escape(row.ean) %]</td>
98      <td>[% HTML.escape(row.qty) %]</td>
99      <td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
100      <td>
101       <select name="unit_[% loop.count %]">
102        [% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
103       </select>
104      </td>
105
106      <td>
107       <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
108        [% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %]
109       </select>
110      </td>
111      <td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td>
112     </tr>
113
114     [% END %]
115
116     <input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
117
118    </table>
119   </p>
120
121   <hr size="3" noshade>
122
123   <p>
124    <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
125   </p>
126  </form>
127
128 </body>
129 </html>