8b342d7c2e1fce94b8695dc74faa54e57f2ac644
[kivitendo-erp.git] / templates / webpages / wh / journal_filter.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [%- USE P %]
4 [%- USE HTML %][%- USE JavaScript %]
5 <h1>[% 'Report about warehouse transactions' | $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">
70
71   <input type="hidden" name="nextsub" value="generate_journal">
72
73   <p>
74    <table>
75     <tr>
76      <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th>
77     </tr>
78
79     <tr>
80      <td>
81       <table>
82        <tr>
83         <th align="right" nowrap>[% 'Warehouse' | $T8 %]:</th>
84         <td>
85          <select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
86           <option value="">---</option>
87           [%- FOREACH warehouse = WAREHOUSES %]
88           <option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
89           [%- END %]
90          </select>
91         </td>
92        </tr>
93        <tr>
94         <th align="right" nowrap>[% 'Bin' | $T8 %]:</th>
95         <td><select name="bin_id" id="bin_id"></select></td>
96        </tr>
97        <tr>
98         <th align="right" nowrap>[% 'Part Number' | $T8 %]:</th>
99         <td><input name="partnumber" id="partnumber" size=20></td>
100        </tr>
101        <tr>
102         <th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th>
103         <td>[% P.select_classification('classification_id') %]</td>
104        </tr>
105        <tr>
106         <th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
107         <td><input name="description" size=40></td>
108        </tr>
109        <tr>
110         <th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th>
111         <td><input name="chargenumber" size=40></td>
112        </tr>
113        [% IF INSTANCE_CONF.get_show_bestbefore %]
114        <tr>
115         <th align="right" nowrap>[% 'Best Before' | $T8 %]:</th>
116         <td>
117           [% L.date_tag('bestbefore') %]
118         </td>
119        </tr>
120        [% END %]
121        <tr>
122         <th align="right" nowrap>[% 'Transfer Quantity' | $T8 %]:</th>
123         <td>
124          <select name="qty_op">
125           <option value="dontcare">---</option>
126           <option value="atleast">[% 'At least' | $T8 %]</option>
127           <option value="atmost">[% 'At most' | $T8 %]</option>
128           <option value="exact">[% 'Exact' | $T8 %]</option>
129          </select>
130          <input name="qty">
131          <select name="qty_unit">
132           [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
133          </select>
134         </td>
135        </tr>
136        <tr>
137         <th align="right" nowrap>[% 'From Date' | $T8 %]</th>
138         <td>
139           [% L.date_tag('fromdate') %]
140         </td>
141        </tr>
142        <tr>
143         <th align="right">[% 'To Date' | $T8 %]</th>
144         <td>
145           [% L.date_tag('todate') %]
146         </td>
147        </tr>
148       </table>
149      </td>
150     </tr>
151
152     <tr height="5"><td>&nbsp;</td></tr>
153
154     <tr>
155      <th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th>
156     </tr>
157
158     <tr>
159      <td>
160       <table>
161        <tr>
162         <td><input name="l_partdescription" id="l_partdescription" class="checkbox" type="hidden" value="Y" checked></td>
163         <td nowrap><label for="l_partdescription">[% 'Part Description' | $T8 %]</label></td>
164         <td><input name="l_qty" id="l_qty" class="checkbox" type="hidden" value="Y" checked></td>
165         <td nowrap><label for="l_qty">[% 'Quantity' | $T8 %]</label></td>
166        </tr>
167        <tr>
168         <td align="right"><input name="l_date" id="l_date" class="checkbox" type="checkbox" value="Y" checked></td>
169         <td nowrap><label for="l_date">[% 'Date' | $T8 %]</label></td>
170         <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
171         <td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td>
172         <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
173         <td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td>
174         [% IF INSTANCE_CONF.get_show_bestbefore %]
175         <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
176         <td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td>
177         [% END %]
178        </tr>
179        <tr>
180         <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
181         <td nowrap><label for="l_trans_id">[% 'Trans Id' | $T8 %]</label></td>
182         <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
183         <td nowrap><label for="l_trans_type">[% 'Trans Type' | $T8 %]</label></td>
184         <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
185         <td nowrap><label for="l_comment">[% 'Comment' | $T8 %]</label></td>
186        </tr>
187        <tr>
188         <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
189         <td nowrap><label for="l_warehouse_from">[% 'Warehouse From' | $T8 %]</label></td>
190         <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
191         <td nowrap><label for="l_bin_from">[% 'Bin From' | $T8 %]</label></td>
192         <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
193         <td nowrap><label for="l_warehouse_to">[% 'Warehouse To' | $T8 %]</label></td>
194         <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
195         <td nowrap><label for="l_bin_to">[% 'Bin To' | $T8 %]</label></td>
196        </tr>
197        <tr>
198         <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
199         <td nowrap><label for="l_employee">[% 'Employee' | $T8 %]</label></td>
200         <td align="right"><input name="l_oe_id" id="l_oe_id" class="checkbox" type="checkbox" value="Y"></td>
201         <td nowrap><label for="l_oe_id">[% 'Document' | $T8 %]</label></td>
202         <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
203         <td nowrap><label for="l_projectnumber">[% 'Project Number' | $T8 %]</label></td>
204        </tr>
205       </table>
206      </td>
207     </tr>
208    </table>
209   </p>
210
211   <p>
212    <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
213   </p>
214  </form>
215