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