1 [% USE HTML %][% USE LxERP %][% USE JavaScript %]<body[% UNLESS delivered %] onload="on_load();"[% END %]>
3 [%- UNLESS delivered %]
4 <script type="text/javascript">
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) %]"];
13 function warehouse_selected(row, index, initial_bin_index) {
14 var cname = "bin_id_" + row;
15 var control = document.getElementById(cname);
17 for (var i = control.options.length - 1; i >= 0; i--) {
18 control.options[i] = null;
21 for (i = 0; i < warehouses[index].length; i++) {
22 control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
25 if (!initial_bin_index)
26 initial_bin_index = 0;
27 control.options[initial_bin_index].selected = true;
31 [%- USE STOCK_INFO_it = Iterator(STOCK_INFO) %][%- FOREACH si = STOCK_INFO_it %]
32 // new si for wh [% si.warehouse_id %] bin [% si.bin_id %]
33 [%- SET warehouse_selected = '0' %]
34 [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH wh = WAREHOUSES_it %]
36 [%- USE BINS_it = Iterator(wh.BINS) %][%- FOREACH bin = BINS_it %]
38 [%- IF bin.id == si.bin_id %]
39 warehouse_selected([% STOCK_INFO_it.count %], [% WAREHOUSES_it.count - 1 %], [% BINS_it.count - 1%]);
40 [%- SET warehouse_selected = '1' %]
44 [%- UNLESS warehouse_selected %]
45 warehouse_selected([% STOCK_INFO_it.count %], 0);
53 <form method="post" action="do.pl" name="Form">
55 <div class="listtop">[% title %]</div>
57 [%- IF ERRORS && ERRORS.size %]
58 <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
65 <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
69 <td>[% HTML.escape(PART_INFO.description) %]</td>
72 <td>Qty according to delivery order</td>
73 <td>[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]</td>
78 <input type="hidden" name="nextsub" value="set_stock_in">
79 <input type="hidden" name="update_nextsub" value="update_stock_in">
80 <input type="hidden" name="rowcount" value="[% HTML.escape(STOCK_INFO.size) %]">
81 <input type="hidden" name="in_out" value="in">
82 <input type="hidden" name="parts_id" value="[% HTML.escape(parts_id) %]">
83 <input type="hidden" name="partunit" value="[% HTML.escape(PART_INFO.unit) %]">
84 <input type="hidden" name="do_qty" value="[% HTML.escape(do_qty) %]">
85 <input type="hidden" name="do_unit" value="[% HTML.escape(do_unit) %]">
86 <input type="hidden" name="row" value="[% HTML.escape(row) %]">
90 <tr class="listheading">
91 <th class="listheading"> </th>
92 <th class="listheading">Warehouse</th>
93 <th class="listheading">Bin</th>
94 <th class="listheading">Charge Number</th>
95 [% IF conf_show_best_before %]
96 <th class="listheading">Best Before</th>
98 <th align="right" class="listheading">Qty</th>
99 <th align="right" class="listheading">Unit</th>
102 [%- FOREACH row = STOCK_INFO %]
103 <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
104 <td>[% loop.count %]</td>
108 <td>[% HTML.escape(row.warehouse_description) %]</td>
109 <td>[% HTML.escape(row.bin_description) %]</td>
110 <td>[% HTML.escape(row.chargenumber) %]</td>
111 [% IF conf_show_best_before %]
112 <td>[% HTML.escape(row.bestbefore) %]</td>
114 <td>[% HTML.escape(LxERP.format_amount(row.qty)) %]</td>
115 <td>[% HTML.escape(row.unit) %]</td>
120 <select name="warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
121 [%- FOREACH wh = WAREHOUSES %]
122 <option value="[% HTML.escape(wh.id) %]"[% IF wh.id == row.warehouse_id %] selected[% END %]>[% HTML.escape(wh.description) %]</option>
127 <td><select name="bin_id_[% loop.count %]" id="bin_id_[% loop.count %]"></select></td>
128 <td><input name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"></td>
129 [% IF conf_show_best_before %]
131 <input name="bestbefore_[% loop.count %]" id="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]" size="11" title="[% myconfig_dateformat %]">
132 <input type="button" name="b_bestbefore_[% loop.count %]" id="bestbefore_trigger_[% loop.count %]" value="?">
135 <td><input name="qty_[% loop.count %]" size="12" value="[% HTML.escape(LxERP.format_amount(row.qty)) %]"></td>
138 <select name="unit_[% loop.count %]">
139 [%- FOREACH unit = UNITS %]
140 <option[% IF unit.name == row.unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
152 <hr size="3" noshade>
156 <button type="button" class="submit" name="action" onclick="window.close()">Close Window</button>
158 <input class="submit" type="submit" name="action" value="Update">
159 <input class="submit" type="submit" name="action" value="Continue">
164 [%- IF NOT delivered %]
165 [% IF conf_show_best_before %]
166 <script type="text/javascript">
168 [%- FOREACH row = STOCK_INFO %]
170 inputField : "bestbefore_[% loop.count %]",
171 ifFormat :"[% myconfig_jsc_dateformat %]",
173 button : "bestbefore_trigger_[% loop.count %]"