Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git] / templates / webpages / wh / journal_filter_en.html
1 [% USE HTML %][% USE JavaScript %]<body onload="on_load();">
2
3  <script type="text/javascript">
4    <!--
5       warehouses = new Array();
6       warehouses[0] = new Array();
7       warehouses[0]['id'] = "0";
8       warehouses[0]['bins'] = new Array();
9       warehouses[0]['bins'][0] = new Array();
10       warehouses[0]['bins'][0]['description'] = "---";
11       warehouses[0]['bins'][0]['id'] = "";
12       [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
13       warehouses[[% WAREHOUSES_it.count %]] = new Array();
14       warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %];
15       warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array();
16       warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array();
17       warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---";
18       warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = "";
19       [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
20       warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
21       warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
22       warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
23       [% END %]
24       [% END %]
25
26       function warehouse_selected(warehouse_id, bin_id) {
27         var control = document.getElementById("bin_id");
28
29         for (var i = control.options.length - 1; i >= 0; i--) {
30           control.options[i] = null;
31         }
32
33         var warehouse_index = 0;
34
35         for (i = 0; i < warehouses.length; i++)
36           if (warehouses[i]['id'] == warehouse_id) {
37             warehouse_index = i;
38             break;
39           }
40
41         var warehouse = warehouses[warehouse_index];
42         var bin_index = 0;
43
44         for (i = 0; i < warehouse['bins'].length; i++)
45           if (warehouse['bins'][i]['id'] == bin_id) {
46             bin_index = i;
47             break;
48           }
49
50         for (i = 0; i < warehouse['bins'].length; i++) {
51           control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
52         }
53
54
55         control.options[bin_index].selected = true;
56       }
57
58       function on_load() {
59         warehouse_selected(0, 0);
60         document.Form.partnumber.focus();
61       }
62      -->
63  </script>
64
65  <div class="listtop">Report about wareouse transactions</div>
66
67  <form method="post" name="Form" action="wh.pl">
68
69   <input type="hidden" name="nextsub" value="generate_journal">
70
71   <p>
72    <table>
73     <tr>
74      <th class="listheading" align="left" valign="top" colspan="6" nowrap>Filter</th>
75     </tr>
76
77     <tr>
78      <td>
79       <table>
80        <tr>
81         <th align="right" nowrap>Warehouse:</th>
82         <td>
83          <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
84           <option value="">---</option>
85           [%- FOREACH warehouse = WAREHOUSES %]
86           <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
87           [%- END %]
88          </select>
89         </td>
90        </tr>
91        <tr>
92         <th align="right" nowrap>Bin:</th>
93         <td><select name="bin_id" id="bin_id"></select></td>
94        </tr>
95        <tr>
96         <th align="right" nowrap>Part Number:</th>
97         <td><input name="partnumber" id="partnumber" size=20></td>
98        </tr>
99        <tr>
100         <th align="right" nowrap>Part Description:</th>
101         <td><input name="description" size=40></td>
102        </tr>
103        <tr>
104         <th align="right" nowrap>Charge Number:</th>
105         <td><input name="chargenumber" size=40></td>
106        </tr>
107        [% IF conf_show_best_before %]
108        <tr>
109         <th align="right" nowrap>Best Before:</th>
110         <td>
111          <input name="bestbefore" id="bestbefore" size="11" title="[% myconfig_dateformat %]">
112          <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
113         </td>
114        </tr>
115        [% END %]
116        <tr>
117         <th align="right" nowrap>Transfer Quantity:</th>
118         <td>
119          <select name="qty_op">
120           <option value="dontcare">---</option>
121           <option value="atleast">At least</option>
122           <option value="atmost">At most</option>
123           <option value="exact">Exact</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</th>
133         <td>
134          <input name="fromdate" id="fromdate" size="11" title="[% myconfig_dateformat %]">
135          <input type="button" name="b_fromdate" id="fromdate_trigger" value="?">
136         </td>
137        </tr>
138        <tr>
139         <th align="right">To Date</th>
140         <td>
141          <input name="todate" id="todate" size="11" title="[% myconfig_dateformat %]">
142          <input type="button" name="b_todate" id="todate_trigger" value="?">
143         </td>
144        </tr>
145       </table>
146      </td>
147     </tr>
148
149     <tr height="5"><td>&nbsp;</td></tr>
150
151     <tr>
152      <th class="listheading" align="left" valign="top" colspan="6" nowrap>Include in Report</th>
153     </tr>
154
155     <tr>
156      <td>
157       <table>
158        <tr>
159         <td><input name="l_partdescription" id="l_partdescription" class="checkbox" type="hidden" value="Y" checked></td>
160         <td nowrap><label for="l_partdescription">Part Description</label></td>
161         <td><input name="l_qty" id="l_qty" class="checkbox" type="hidden" value="Y" checked></td>
162         <td nowrap><label for="l_qty">Quantity</label></td>
163        </tr>
164        <tr>
165         <td align="right"><input name="l_date" id="l_date" class="checkbox" type="checkbox" value="Y" checked></td>
166         <td nowrap><label for="l_date">Date</label></td>
167         <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
168         <td nowrap><label for="l_partnumber">Part Number</label></td>
169         <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
170         <td nowrap><label for="l_chargenumber">Charge Number</label></td>
171         [% IF conf_show_best_before %]
172         <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
173         <td nowrap><label for="l_bestbefore">Best Before</label></td>
174         [% END %]
175        </tr>
176        <tr>
177         <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
178         <td nowrap><label for="l_trans_id">Trans Id</label></td>
179         <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
180         <td nowrap><label for="l_trans_type">Trans Type</label></td>
181         <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
182         <td nowrap><label for="l_comment">Comment</label></td>
183        </tr>
184        <tr>
185         <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
186         <td nowrap><label for="l_warehouse_from">Warehouse From</label></td>
187         <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
188         <td nowrap><label for="l_bin_from">Bin From</label></td>
189         <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
190         <td nowrap><label for="l_warehouse_to">Warehouse To</label></td>
191         <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
192         <td nowrap><label for="l_bin_to">Bin To</label></td>
193        </tr>
194        <tr>
195         <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
196         <td nowrap><label for="l_employee">Employee</label></td>
197         <td align="right"><input name="l_oe_id" id="l_oe_id" class="checkbox" type="checkbox" value="Y"></td>
198         <td nowrap><label for="l_oe_id">Document</label></td>
199         <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
200         <td nowrap><label for="l_projectnumber">Project Number</label></td>
201        </tr>
202       </table>
203      </td>
204     </tr>
205    </table>
206   </p>
207
208   <p>
209    <input type="submit" class="submit" name="action" value="Continue">
210   </p>
211  </form>
212
213   <script type="text/javascript">
214     <!--
215     [% IF conf_show_best_before %]
216     Calendar.setup( {
217       inputField : "bestbefore",
218       ifFormat :"[% myconfig_jsc_dateformat %]",
219       align : "BR",
220       button : "bestbefore_trigger"
221     });
222     [% END %]
223
224     Calendar.setup( {
225       inputField : "fromdate",
226       ifFormat :"[% myconfig_jsc_dateformat %]",
227       align : "BR",
228       button : "fromdate_trigger"
229     });
230
231      Calendar.setup( {
232       inputField : "todate",
233       ifFormat :"[% myconfig_jsc_dateformat %]",
234       align : "BL",
235       button : "todate_trigger"
236     });
237      //-->
238   </script>
239
240 </body>
241 </html>