3 [%- USE HTML %][%- USE JavaScript %]
4 <script type="text/javascript">
6 warehouses = new Array();
7 warehouses[0] = new Array();
8 warehouses[0]['id'] = "0";
9 warehouses[0]['bins'] = new Array();
10 warehouses[0]['bins'][0] = new Array();
11 warehouses[0]['bins'][0]['description'] = "---";
12 warehouses[0]['bins'][0]['id'] = "";
13 [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
14 warehouses[[% WAREHOUSES_it.count %]] = new Array();
15 warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %];
16 warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array();
17 warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array();
18 warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---";
19 warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = "";
20 [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
21 warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
22 warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
23 warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
27 function warehouse_selected(warehouse_id, bin_id) {
28 var control = document.getElementById("bin_id");
30 for (var i = control.options.length - 1; i >= 0; i--) {
31 control.options[i] = null;
34 var warehouse_index = 0;
36 for (i = 0; i < warehouses.length; i++)
37 if (warehouses[i]['id'] == warehouse_id) {
42 var warehouse = warehouses[warehouse_index];
45 for (i = 0; i < warehouse['bins'].length; i++)
46 if (warehouse['bins'][i]['id'] == bin_id) {
51 for (i = 0; i < warehouse['bins'].length; i++) {
52 control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
56 control.options[bin_index].selected = true;
60 warehouse_selected(0, 0);
61 document.Form.partnumber.focus();
66 <div class="listtop">[% 'Report about warehouse contents' | $T8 %]</div>
68 <form method="post" name="Form" action="wh.pl">
70 <input type="hidden" name="nextsub" value="generate_report">
75 <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th>
82 <th align="right" nowrap>[% 'Warehouse' | $T8 %]:</th>
84 <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
85 <option value="">---</option>
86 [%- FOREACH warehouse = WAREHOUSES %]
87 <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
93 <th align="right" nowrap>[% 'Bin' | $T8 %]:</th>
94 <td><select name="bin_id" id="bin_id"></select></td>
97 <th align="right" nowrap>[% 'Part Number' | $T8 %]:</th>
98 <td><input name="partnumber" size=20></td>
101 <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
102 <td><input name="description" size=40></td>
105 <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
106 <td><input name="chargenumber" size=40></td>
108 [% IF INSTANCE_CONF.get_show_bestbefore %]
110 <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
112 [% L.date_tag('bestbefore') %]
117 <th align="right" nowrap>[% 'Qty in stock' | $T8 %]:</th>
119 <select name="qty_op">
120 <option value="dontcare">---</option>
121 <option value="atleast">[% 'At least' | $T8 %]</option>
122 <option value="atmost">[% 'At most' | $T8 %]</option>
123 <option value="exact">[% 'Exact' | $T8 %]</option>
126 <select name="qty_unit">
127 [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
131 <th align="right" nowrap>[% 'Stock Qty for Date' | $T8 %]:</th>
132 <td>[% L.date_tag('date') %]</td>
139 <tr height="5"><td> </td></tr>
142 <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
147 <input name="l_partdescription" type="hidden" value="Y">
148 <input name="l_qty" type="hidden" value="Y">
152 <td align="right"><input name="l_warehousedescription" id="l_warehousedescription" class="checkbox" type="checkbox" value="Y" checked></td>
153 <td nowrap><label for="l_warehousedescription">[% 'Warehouse' | $T8 %]</label></td>
154 <td align="right"><input name="l_bindescription" id="l_bindescription" class="checkbox" type="checkbox" value="Y" checked></td>
155 <td nowrap><label for="l_bindescription">[% 'Bin' | $T8 %]</label></td>
159 <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
160 <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
161 <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
162 <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
163 [% IF INSTANCE_CONF.get_show_bestbefore %]
164 <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
165 <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
169 <tr><td colspan="4"><hr noshade height="1"></td></tr>
172 <td align="right"><input name="subtotal" id="subtotal" class="checkbox" type="checkbox" value="Y"></td>
173 <td nowrap><label for="subtotal">[% 'Subtotal' | $T8 %]</label></td>
174 <td align="right"><input name="include_empty_bins" id="include_empty_bins" class="checkbox" type="checkbox" value="Y"></td>
175 <td nowrap><label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label></td>
176 <td align="right"><input name="include_invalid_warehouses" id="include_invalid_warehouses" class="checkbox" type="checkbox" value="Y"></td>
177 <td nowrap><label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label></td>
181 <td align="right"><input name="l_stock_value" id="l_stock_value" class="checkbox" type="checkbox" value="Y"></td>
182 <td nowrap><label for="l_stock_value">[% 'Stock value' | $T8 %]</label></td>
192 <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">