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