2 [%- USE HTML %][%- USE JavaScript %]
3 <script type="text/javascript">
5 warehouses = new Array();
6 [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
7 warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
8 [% 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) %]"];
12 function warehouse_selected(row, index) {
13 var cname = "dst_bin_id_" + row;
14 var control = document.getElementById(cname);
16 for (var i = control.options.length - 1; i >= 0; i--) {
17 control.options[i] = null;
20 for (i = 0; i < warehouses[index].length; i++) {
21 control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
24 control.options[0].selected = true;
28 [% FOREACH row = CONTENTS %]
29 warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
35 <form method="post" action="wh.pl">
37 <input type="hidden" name="nextsub" value="transfer_parts">
38 <input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
40 <div class="listtop">[% title %]</div>
42 <p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
47 <td>[% 'Select type of transfer' | $T8 %]:</td>
49 <select name="transfer_type_id">
50 [%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %]
56 <td>[% 'Optional comment' | $T8 %]:</td>
57 <td><input name="comment" size="20"></td>
65 <th class="listheading">[% 'Source bin' | $T8 %]</th>
66 <th class="listheading">[% 'Part Number' | $T8 %]</th>
67 <th class="listheading">[% 'Part Description' | $T8 %]</th>
68 <th class="listheading">[% 'Charge Number' | $T8 %]</th>
69 [% IF INSTANCE_CONF.get_show_bestbefore %]
70 <th class="listheading">[% 'Best Before' | $T8 %]</th>
72 <th class="listheading">[% 'EAN' | $T8 %]</th>
73 <th class="listheading">[% 'Available qty' | $T8 %]</th>
74 <th class="listheading" colspan="2">[% 'Transfer qty' | $T8 %]</th>
75 <th class="listheading" colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
78 [% FOREACH row = CONTENTS %]
79 <tr class="listrow[% loop.count % 2 %]">
80 <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
81 <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
82 <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
83 <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
84 <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
85 [% IF INSTANCE_CONF.get_show_bestbefore %]
86 <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
88 <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
89 <td>[% HTML.escape(row.bindescription) %]</td>
90 <td>[% HTML.escape(row.partnumber) %]</td>
91 <td>[% HTML.escape(row.partdescription) %]</td>
92 <td>[% HTML.escape(row.chargenumber) %]</td>
93 [% IF INSTANCE_CONF.get_show_bestbefore %]
94 <td>[% HTML.escape(row.bestbefore) %]</td>
96 <td>[% HTML.escape(row.ean) %]</td>
97 <td>[% HTML.escape(row.qty) %]</td>
98 <td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
100 <select name="unit_[% loop.count %]">
101 [% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
106 <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
107 [% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %]
110 <td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td>
115 <input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
120 <hr size="3" noshade>
123 <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">