Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git] / templates / webpages / wh / journal_filter.html
1 [%- USE T8 %]
2 [% USE HTML %][% USE JavaScript %]<body onload="on_load();">
3
4  <script type="text/javascript">
5    <!--
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 %];
24       [% END %]
25       [% END %]
26
27       function warehouse_selected(warehouse_id, bin_id) {
28         var control = document.getElementById("bin_id");
29
30         for (var i = control.options.length - 1; i >= 0; i--) {
31           control.options[i] = null;
32         }
33
34         var warehouse_index = 0;
35
36         for (i = 0; i < warehouses.length; i++)
37           if (warehouses[i]['id'] == warehouse_id) {
38             warehouse_index = i;
39             break;
40           }
41
42         var warehouse = warehouses[warehouse_index];
43         var bin_index = 0;
44
45         for (i = 0; i < warehouse['bins'].length; i++)
46           if (warehouse['bins'][i]['id'] == bin_id) {
47             bin_index = i;
48             break;
49           }
50
51         for (i = 0; i < warehouse['bins'].length; i++) {
52           control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
53         }
54
55
56         control.options[bin_index].selected = true;
57       }
58
59       function on_load() {
60         warehouse_selected(0, 0);
61         document.Form.partnumber.focus();
62       }
63      -->
64  </script>
65
66  <div class="listtop">[% 'Report about warehouse transactions' | $T8 %]</div>
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 conf_show_best_before %]
109        <tr>
110         <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
111         <td>
112          <input name="bestbefore" id="bestbefore" size="11" title="[% myconfig_dateformat %]">
113          <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
114         </td>
115        </tr>
116        [% END %]
117        <tr>
118         <th align="right" nowrap>[% 'Transfer Quantity' | $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        <tr>
133         <th align="right" nowrap>[% 'From Date' | $T8 %]</th>
134         <td>
135          <input name="fromdate" id="fromdate" size="11" title="[% myconfig_dateformat %]">
136          <input type="button" name="b_fromdate" id="fromdate_trigger" value="?">
137         </td>
138        </tr>
139        <tr>
140         <th align="right">[% 'To Date' | $T8 %]</th>
141         <td>
142          <input name="todate" id="todate" size="11" title="[% myconfig_dateformat %]">
143          <input type="button" name="b_todate" id="todate_trigger" value="?">
144         </td>
145        </tr>
146       </table>
147      </td>
148     </tr>
149
150     <tr height="5"><td>&nbsp;</td></tr>
151
152     <tr>
153      <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
154     </tr>
155
156     <tr>
157      <td>
158       <table>
159        <tr>
160         <td><input name="l_partdescription" id="l_partdescription" class="checkbox" type="hidden" value="Y" checked></td>
161         <td nowrap><label for="l_partdescription">[% 'Part Description' | $T8 %]</label></td>
162         <td><input name="l_qty" id="l_qty" class="checkbox" type="hidden" value="Y" checked></td>
163         <td nowrap><label for="l_qty">[% 'Quantity' | $T8 %]</label></td>
164        </tr>
165        <tr>
166         <td align="right"><input name="l_date" id="l_date" class="checkbox" type="checkbox" value="Y" checked></td>
167         <td nowrap><label for="l_date">[% 'Date' | $T8 %]</label></td>
168         <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
169         <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
170         <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
171         <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
172         [% IF conf_show_best_before %]
173         <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
174         <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
175         [% END %]
176        </tr>
177        <tr>
178         <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
179         <td nowrap><label for="l_trans_id">[% 'Trans Id' | $T8 %]</label></td>
180         <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
181         <td nowrap><label for="l_trans_type">[% 'Trans Type' | $T8 %]</label></td>
182         <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
183         <td nowrap><label for="l_comment">[% 'Comment' | $T8 %]</label></td>
184        </tr>
185        <tr>
186         <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
187         <td nowrap><label for="l_warehouse_from">[% 'Warehouse From' | $T8 %]</label></td>
188         <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
189         <td nowrap><label for="l_bin_from">[% 'Bin From' | $T8 %]</label></td>
190         <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
191         <td nowrap><label for="l_warehouse_to">[% 'Warehouse To' | $T8 %]</label></td>
192         <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
193         <td nowrap><label for="l_bin_to">[% 'Bin To' | $T8 %]</label></td>
194        </tr>
195        <tr>
196         <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
197         <td nowrap><label for="l_employee">[% 'Employee' | $T8 %]</label></td>
198         <td align="right"><input name="l_oe_id" id="l_oe_id" class="checkbox" type="checkbox" value="Y"></td>
199         <td nowrap><label for="l_oe_id">[% 'Document' | $T8 %]</label></td>
200         <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
201         <td nowrap><label for="l_projectnumber">[% 'Project Number' | $T8 %]</label></td>
202        </tr>
203       </table>
204      </td>
205     </tr>
206    </table>
207   </p>
208
209   <p>
210    <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
211   </p>
212  </form>
213
214   <script type="text/javascript">
215     <!--
216     [% IF conf_show_best_before %]
217     Calendar.setup( {
218       inputField : "bestbefore",
219       ifFormat :"[% myconfig_jsc_dateformat %]",
220       align : "BR",
221       button : "bestbefore_trigger"
222     });
223     [% END %]
224
225     Calendar.setup( {
226       inputField : "fromdate",
227       ifFormat :"[% myconfig_jsc_dateformat %]",
228       align : "BR",
229       button : "fromdate_trigger"
230     });
231
232      Calendar.setup( {
233       inputField : "todate",
234       ifFormat :"[% myconfig_jsc_dateformat %]",
235       align : "BL",
236       button : "todate_trigger"
237     });
238      //-->
239   </script>
240
241 </body>
242 </html>