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>
64 <td><translate>Part Number</translate></td>
65 <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
68 <td><translate>Description</translate></td>
69 <td>[% HTML.escape(PART_INFO.description) %]</td>
72 <td><translate>Qty according to delivery order</translate></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"><translate>Warehouse</translate></th>
93 <th class="listheading"><translate>Bin</translate></th>
94 <th class="listheading"><translate>Charge Number</translate></th>
95 <th align="right" class="listheading"><translate>Qty</translate></th>
96 <th align="right" class="listheading"><translate>Unit</translate></th>
99 [%- FOREACH row = STOCK_INFO %]
100 <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
101 <td>[% loop.count %]</td>
105 <td>[% HTML.escape(row.warehouse_description) %]</td>
106 <td>[% HTML.escape(row.bin_description) %]</td>
107 <td>[% HTML.escape(row.chargenumber) %]</td>
108 <td>[% HTML.escape(LxERP.format_amount(row.qty)) %]</td>
109 <td>[% HTML.escape(row.unit) %]</td>
114 <select name="warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
115 [%- FOREACH wh = WAREHOUSES %]
116 <option value="[% HTML.escape(wh.id) %]"[% IF wh.id == row.warehouse_id %] selected[% END %]>[% HTML.escape(wh.description) %]</option>
121 <td><select name="bin_id_[% loop.count %]" id="bin_id_[% loop.count %]"></select></td>
122 <td><input name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"></td>
123 <td><input name="qty_[% loop.count %]" size="12" value="[% HTML.escape(LxERP.format_amount(row.qty)) %]"></td>
126 <select name="unit_[% loop.count %]">
127 [%- FOREACH unit = UNITS %]
128 <option[% IF unit.name == row.unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
140 <hr size="3" noshade>
144 <button type="button" class="submit" name="action" onclick="window.close()"><translate>Close Window</translate></button>
146 <input class="submit" type="submit" name="action" value="<translate>Update</translate>">
147 <input class="submit" type="submit" name="action" value="<translate>Continue</translate>">