07ec2e7b3c21ceb4dd3b0d5a511ce05280ca8622
[kivitendo-erp.git] / templates / webpages / wh / journal_filter.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [%- USE HTML %][%- USE JavaScript %]
4 <h1>[% 'Report about warehouse transactions' | $T8 %]</h1>
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() {
62         warehouse_selected(0, 0);
63         document.Form.partnumber.focus();
64       })
65      -->
66  </script>
67
68  <form method="post" name="Form" action="wh.pl">
69
70   <input type="hidden" name="nextsub" value="generate_journal">
71
72   <p>
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" id="partnumber" size=20></td>
99        </tr>
100        <tr>
101         <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
102         <td><input name="description" size=40></td>
103        </tr>
104        <tr>
105         <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
106         <td><input name="chargenumber" size=40></td>
107        </tr>
108        [% IF INSTANCE_CONF.get_show_bestbefore %]
109        <tr>
110         <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
111         <td>
112           [% L.date_tag('bestbefore') %]
113         </td>
114        </tr>
115        [% END %]
116        <tr>
117         <th align="right" nowrap>[% 'Transfer Quantity' | $T8 %]:</th>
118         <td>
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>
124          </select>
125          <input name="qty">
126          <select name="qty_unit">
127           [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
128          </select>
129         </td>
130        </tr>
131        <tr>
132         <th align="right" nowrap>[% 'From Date' | $T8 %]</th>
133         <td>
134           [% L.date_tag('fromdate') %]
135         </td>
136        </tr>
137        <tr>
138         <th align="right">[% 'To Date' | $T8 %]</th>
139         <td>
140           [% L.date_tag('todate') %]
141         </td>
142        </tr>
143       </table>
144      </td>
145     </tr>
146
147     <tr height="5"><td>&nbsp;</td></tr>
148
149     <tr>
150      <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
151     </tr>
152
153     <tr>
154      <td>
155       <table>
156        <tr>
157         <td><input name="l_partdescription" id="l_partdescription" class="checkbox" type="hidden" value="Y" checked></td>
158         <td nowrap><label for="l_partdescription">[% 'Part Description' | $T8 %]</label></td>
159         <td><input name="l_qty" id="l_qty" class="checkbox" type="hidden" value="Y" checked></td>
160         <td nowrap><label for="l_qty">[% 'Quantity' | $T8 %]</label></td>
161        </tr>
162        <tr>
163         <td align="right"><input name="l_date" id="l_date" class="checkbox" type="checkbox" value="Y" checked></td>
164         <td nowrap><label for="l_date">[% 'Date' | $T8 %]</label></td>
165         <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
166         <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
167         <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
168         <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
169         [% IF INSTANCE_CONF.get_show_bestbefore %]
170         <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
171         <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
172         [% END %]
173        </tr>
174        <tr>
175         <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
176         <td nowrap><label for="l_trans_id">[% 'Trans Id' | $T8 %]</label></td>
177         <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
178         <td nowrap><label for="l_trans_type">[% 'Trans Type' | $T8 %]</label></td>
179         <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
180         <td nowrap><label for="l_comment">[% 'Comment' | $T8 %]</label></td>
181        </tr>
182        <tr>
183         <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
184         <td nowrap><label for="l_warehouse_from">[% 'Warehouse From' | $T8 %]</label></td>
185         <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
186         <td nowrap><label for="l_bin_from">[% 'Bin From' | $T8 %]</label></td>
187         <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
188         <td nowrap><label for="l_warehouse_to">[% 'Warehouse To' | $T8 %]</label></td>
189         <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
190         <td nowrap><label for="l_bin_to">[% 'Bin To' | $T8 %]</label></td>
191        </tr>
192        <tr>
193         <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
194         <td nowrap><label for="l_employee">[% 'Employee' | $T8 %]</label></td>
195         <td align="right"><input name="l_oe_id" id="l_oe_id" class="checkbox" type="checkbox" value="Y"></td>
196         <td nowrap><label for="l_oe_id">[% 'Document' | $T8 %]</label></td>
197         <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
198         <td nowrap><label for="l_projectnumber">[% 'Project Number' | $T8 %]</label></td>
199        </tr>
200       </table>
201      </td>
202     </tr>
203    </table>
204   </p>
205
206   <p>
207    <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
208   </p>
209  </form>
210