Funktionalität für Mindesthaltbarkeitsdatum hinzugefügt.
[kivitendo-erp.git] / templates / webpages / wh / journal_filter_master.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"><translate>Report about wareouse transactions</translate></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><translate>Filter</translate></th>
75     </tr>
76
77     <tr>
78      <td>
79       <table>
80        <tr>
81         <th align="right" nowrap><translate>Warehouse</translate>:</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><translate>Bin</translate>:</th>
93         <td><select name="bin_id" id="bin_id"></select></td>
94        </tr>
95        <tr>
96         <th align="right" nowrap><translate>Part Number</translate>:</th>
97         <td><input name="partnumber" id="partnumber" size=20></td>
98        </tr>
99        <tr>
100         <th align="right" nowrap><translate>Part Description</translate>:</th>
101         <td><input name="description" size=40></td>
102        </tr>
103        <tr>
104         <th align="right" nowrap><translate>Charge Number</translate>:</th>
105         <td><input name="chargenumber" size=40></td>
106        </tr>
107        <tr>
108         <th align="right" nowrap><translate>Best Before</translate>:</th>
109         <td>
110          <input name="bestbefore" id="bestbefore" size="11" title="[% myconfig_dateformat %]">
111          <input type="button" name="b_bestbefore" id="bestbefore_trigger" value="?">
112         </td>
113        </tr>
114        <tr>
115         <th align="right" nowrap><translate>Transfer Quantity</translate>:</th>
116         <td>
117          <select name="qty_op">
118           <option value="dontcare">---</option>
119           <option value="atleast"><translate>At least</translate></option>
120           <option value="atmost"><translate>At most</translate></option>
121           <option value="exact"><translate>Exact</translate></option>
122          </select>
123          <input name="qty">
124          <select name="qty_unit">
125           [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
126          </select>
127         </td>
128        </tr>
129        <tr>
130         <th align="right" nowrap><translate>From Date</translate></th>
131         <td>
132          <input name="fromdate" id="fromdate" size="11" title="[% myconfig_dateformat %]">
133          <input type="button" name="b_fromdate" id="fromdate_trigger" value="?">
134         </td>
135        </tr>
136        <tr>
137         <th align="right"><translate>To Date</translate></th>
138         <td>
139          <input name="todate" id="todate" size="11" title="[% myconfig_dateformat %]">
140          <input type="button" name="b_todate" id="todate_trigger" value="?">
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><translate>Include in Report</translate></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"><translate>Part Description</translate></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"><translate>Quantity</translate></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"><translate>Date</translate></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"><translate>Part Number</translate></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"><translate>Charge Number</translate></label></td>
169         <td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td>
170         <td nowrap><label for="l_bestbefore"><translate>Best Before</translate></label></td>
171        </tr>
172        <tr>
173         <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
174         <td nowrap><label for="l_trans_id"><translate>Trans Id</translate></label></td>
175         <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
176         <td nowrap><label for="l_trans_type"><translate>Trans Type</translate></label></td>
177         <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
178         <td nowrap><label for="l_comment"><translate>Comment</translate></label></td>
179        </tr>
180        <tr>
181         <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
182         <td nowrap><label for="l_warehouse_from"><translate>Warehouse From</translate></label></td>
183         <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
184         <td nowrap><label for="l_bin_from"><translate>Bin From</translate></label></td>
185         <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
186         <td nowrap><label for="l_warehouse_to"><translate>Warehouse To</translate></label></td>
187         <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
188         <td nowrap><label for="l_bin_to"><translate>Bin To</translate></label></td>
189        </tr>
190        <tr>
191         <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
192         <td nowrap><label for="l_employee"><translate>Employee</translate></label></td>
193         <td align="right"><input name="l_oe_id" id="l_oe_id" class="checkbox" type="checkbox" value="Y"></td>
194         <td nowrap><label for="l_oe_id"><translate>Document</translate></label></td>
195         <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
196         <td nowrap><label for="l_projectnumber"><translate>Project Number</translate></label></td>
197        </tr>
198       </table>
199      </td>
200     </tr>
201    </table>
202   </p>
203
204   <p>
205    <input type="submit" class="submit" name="action" value="<translate>Continue</translate>">
206   </p>
207  </form>
208
209   <script type="text/javascript">
210     <!--
211     Calendar.setup( {
212       inputField : "bestbefore",
213       ifFormat :"[% myconfig_jsc_dateformat %]",
214       align : "BR",
215       button : "bestbefore_trigger"
216     });
217
218     Calendar.setup( {
219       inputField : "fromdate",
220       ifFormat :"[% myconfig_jsc_dateformat %]",
221       align : "BR",
222       button : "fromdate_trigger"
223     });
224
225      Calendar.setup( {
226       inputField : "todate",
227       ifFormat :"[% myconfig_jsc_dateformat %]",
228       align : "BL",
229       button : "todate_trigger"
230     });
231      //-->
232   </script>
233
234 </body>
235 </html>