Date-Input-Felder durch 'L.date_tag's ersetzt
[kivitendo-erp.git] / templates / webpages / wh / report_filter.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [% USE HTML %][% USE JavaScript %]<body onload="on_load();">
4
5  <script type="text/javascript">
6    <!--
7       warehouses = new Array();
8       warehouses[0] = new Array();
9       warehouses[0]['id'] = "0";
10       warehouses[0]['bins'] = new Array();
11       warehouses[0]['bins'][0] = new Array();
12       warehouses[0]['bins'][0]['description'] = "---";
13       warehouses[0]['bins'][0]['id'] = "";
14       [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
15       warehouses[[% WAREHOUSES_it.count %]] = new Array();
16       warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %];
17       warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array();
18       warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array();
19       warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---";
20       warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = "";
21       [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
22       warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
23       warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
24       warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
25       [% END %]
26       [% END %]
27
28       function warehouse_selected(warehouse_id, bin_id) {
29         var control = document.getElementById("bin_id");
30
31         for (var i = control.options.length - 1; i >= 0; i--) {
32           control.options[i] = null;
33         }
34
35         var warehouse_index = 0;
36
37         for (i = 0; i < warehouses.length; i++)
38           if (warehouses[i]['id'] == warehouse_id) {
39             warehouse_index = i;
40             break;
41           }
42
43         var warehouse = warehouses[warehouse_index];
44         var bin_index = 0;
45
46         for (i = 0; i < warehouse['bins'].length; i++)
47           if (warehouse['bins'][i]['id'] == bin_id) {
48             bin_index = i;
49             break;
50           }
51
52         for (i = 0; i < warehouse['bins'].length; i++) {
53           control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
54         }
55
56
57         control.options[bin_index].selected = true;
58       }
59
60       function on_load() {
61         warehouse_selected(0, 0);
62         document.Form.partnumber.focus();
63       }
64      -->
65  </script>
66
67  <div class="listtop">[% 'Report about warehouse contents' | $T8 %]</div>
68
69  <form method="post" name="Form" action="wh.pl">
70
71   <input type="hidden" name="nextsub" value="generate_report">
72
73   <p>
74    <table>
75     <tr>
76      <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th>
77     </tr>
78
79     <tr>
80      <td>
81       <table>
82        <tr>
83         <th align="right" nowrap>[% 'Warehouse' | $T8 %]:</th>
84         <td>
85          <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
86           <option value="">---</option>
87           [%- FOREACH warehouse = WAREHOUSES %]
88           <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
89           [%- END %]
90          </select>
91         </td>
92        </tr>
93        <tr>
94         <th align="right" nowrap>[% 'Bin' | $T8 %]:</th>
95         <td><select name="bin_id" id="bin_id"></select></td>
96        </tr>
97        <tr>
98         <th align="right" nowrap>[% 'Part Number' | $T8 %]:</th>
99         <td><input name="partnumber" size=20></td>
100        </tr>
101        <tr>
102         <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
103         <td><input name="description" size=40></td>
104        </tr>
105        <tr>
106         <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
107         <td><input name="chargenumber" size=40></td>
108        </tr>
109        [% IF conf_show_best_before %]
110        <tr>
111         <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
112         <td>
113           [% L.date_tag('bestbefore') %]
114         </td>
115        </tr>
116        [% END %]
117        <tr>
118         <th align="right" nowrap>[% 'Qty in stock' | $T8 %]:</th>
119         <td>
120          <select name="qty_op">
121           <option value="dontcare">---</option>
122           <option value="atleast">[% 'At least' | $T8 %]</option>
123           <option value="atmost">[% 'At most' | $T8 %]</option>
124           <option value="exact">[% 'Exact' | $T8 %]</option>
125          </select>
126          <input name="qty">
127          <select name="qty_unit">
128           [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
129          </select>
130         </td>
131        </tr>
132         <th align="right" nowrap>[% 'Stock Qty for Date' | $T8 %]:</th>
133         <td>[% L.date_tag('date') %]</td>
134        <tr>
135        </tr>
136       </table>
137      </td>
138     </tr>
139
140     <tr height="5"><td>&nbsp;</td></tr>
141
142     <tr>
143      <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
144     </tr>
145
146     <tr>
147      <td>
148       <input name="l_partdescription" type="hidden" value="Y">
149       <input name="l_qty" type="hidden" value="Y">
150
151       <table>
152        <tr>
153         <td align="right"><input name="l_warehousedescription" id="l_warehousedescription" class="checkbox" type="checkbox" value="Y" checked></td>
154         <td nowrap><label for="l_warehousedescription">[% 'Warehouse' | $T8 %]</label></td>
155         <td align="right"><input name="l_bindescription" id="l_bindescription" class="checkbox" type="checkbox" value="Y" checked></td>
156         <td nowrap><label for="l_bindescription">[% 'Bin' | $T8 %]</label></td>
157        </tr>
158
159        <tr>
160         <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
161         <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
162         <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
163         <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
164         [% IF conf_show_best_before %]
165         <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
166         <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
167         [% END %]
168        </tr>
169
170        <tr><td colspan="4"><hr noshade height="1"></td></tr>
171
172        <tr>
173         <td align="right"><input name="subtotal" id="subtotal" class="checkbox" type="checkbox" value="Y"></td>
174         <td nowrap><label for="subtotal">[% 'Subtotal' | $T8 %]</label></td>
175         <td align="right"><input name="include_empty_bins" id="include_empty_bins" class="checkbox" type="checkbox" value="Y"></td>
176         <td nowrap><label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label></td>
177         <td align="right"><input name="include_invalid_warehouses" id="include_invalid_warehouses" class="checkbox" type="checkbox" value="Y"></td>
178         <td nowrap><label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label></td>
179        </tr>
180
181        <tr>
182         <td align="right"><input name="l_stock_value" id="l_stock_value" class="checkbox" type="checkbox" value="Y"></td>
183         <td nowrap><label for="l_stock_value">[% 'Stock value' | $T8 %]</label></td>
184        </tr>
185
186       </table>
187      </td>
188     </tr>
189    </table>
190   </p>
191
192   <p>
193    <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
194   </p>
195  </form>
196
197 </body>
198 </html>