Lagerverwaltung implementiert.
[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>Transfer Quantity</translate>:</th>
109         <td>
110          <select name="qty_op">
111           <option value="dontcare">---</option>
112           <option value="atleast"><translate>At least</translate></option>
113           <option value="atmost"><translate>At most</translate></option>
114           <option value="exact"><translate>Exact</translate></option>
115          </select>
116          <input name="qty">
117          <select name="qty_unit">
118           [%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %]
119          </select>
120         </td>
121        </tr>
122        <tr>
123         <th align="right" nowrap><translate>From Date</translate></th>
124         <td>
125          <input name="fromdate" id="fromdate" size="11" title="[% myconfig_dateformat %]">
126          <input type="button" name="b_fromdate" id="fromdate_trigger" value="?">
127         </td>
128        </tr>
129        <tr>
130         <th align="right"><translate>To Date</translate></th>
131         <td>
132          <input name="todate" id="todate" size="11" title="[% myconfig_dateformat %]">
133          <input type="button" name="b_todate" id="todate_trigger" value="?">
134         </td>
135        </tr>
136       </table>
137      </td>
138     </tr>
139
140     <tr height="5"><td>&nbsp;</td></tr>
141
142     <tr>
143      <th class="listheading" align="left" valign="top" colspan="6" nowrap><translate>Include in Report</translate></th>
144     </tr>
145
146     <tr>
147      <td>
148       <table>
149        <tr>
150         <td><input name="l_partdescription" id="l_partdescription" class="checkbox" type="hidden" value="Y" checked></td>
151         <td nowrap><label for="l_partdescription"><translate>Part Description</translate></label></td>
152         <td><input name="l_qty" id="l_qty" class="checkbox" type="hidden" value="Y" checked></td>
153         <td nowrap><label for="l_qty"><translate>Quantity</translate></label></td>
154        </tr>
155        <tr>
156         <td align="right"><input name="l_date" id="l_date" class="checkbox" type="checkbox" value="Y" checked></td>
157         <td nowrap><label for="l_date"><translate>Date</translate></label></td>
158         <td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td>
159         <td nowrap><label for="l_partnumber"><translate>Part Number</translate></label></td>
160         <td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td>
161         <td nowrap><label for="l_chargenumber"><translate>Charge Number</translate></label></td>
162        </tr>
163        <tr>
164         <td align="right"><input name="l_trans_id" id="l_trans_id" class="checkbox" type="checkbox" value="Y"></td>
165         <td nowrap><label for="l_trans_id"><translate>Trans Id</translate></label></td>
166         <td align="right"><input name="l_trans_type" id="l_trans_type" class="checkbox" type="checkbox" value="Y" checked></td>
167         <td nowrap><label for="l_trans_type"><translate>Trans Type</translate></label></td>
168         <td align="right"><input name="l_comment" id="l_comment" class="checkbox" type="checkbox" value="Y"></td>
169         <td nowrap><label for="l_comment"><translate>Comment</translate></label></td>
170        </tr>
171        <tr>
172         <td align="right"><input name="l_warehouse_from" id="l_warehouse_from" class="checkbox" type="checkbox" value="Y" checked></td>
173         <td nowrap><label for="l_warehouse_from"><translate>Warehouse From</translate></label></td>
174         <td align="right"><input name="l_bin_from" id="l_bin_from" class="checkbox" type="checkbox" value="Y" checked></td>
175         <td nowrap><label for="l_bin_from"><translate>Bin From</translate></label></td>
176         <td align="right"><input name="l_warehouse_to" id="l_warehouse_to" class="checkbox" type="checkbox" value="Y" checked></td>
177         <td nowrap><label for="l_warehouse_to"><translate>Warehouse To</translate></label></td>
178         <td align="right"><input name="l_bin_to" id="l_bin_to" class="checkbox" type="checkbox" value="Y" checked></td>
179         <td nowrap><label for="l_bin_to"><translate>Bin To</translate></label></td>
180        </tr>
181        <tr>
182         <td align="right"><input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y"></td>
183         <td nowrap><label for="l_employee"><translate>Employee</translate></label></td>
184         <td align="right"><input name="l_projectnumber" id="l_projectnumber" class="checkbox" type="checkbox" value="Y" checked></td>
185         <td nowrap><label for="l_projectnumber"><translate>Project Number</translate></label></td>
186        </tr>
187       </table>
188      </td>
189     </tr>
190    </table>
191   </p>
192
193   <p>
194    <input type="submit" class="submit" name="action" value="<translate>Continue</translate>">
195   </p>
196  </form>
197
198   <script type="text/javascript">
199     <!--
200     Calendar.setup( {
201       inputField : "fromdate",
202       ifFormat :"[% myconfig_jsc_dateformat %]",
203       align : "BR",
204       button : "fromdate_trigger"
205     });
206
207      Calendar.setup( {
208       inputField : "todate",
209       ifFormat :"[% myconfig_jsc_dateformat %]",
210       align : "BL",
211       button : "todate_trigger"
212     });
213      //-->
214   </script>
215
216 </body>
217 </html>