Revision 2ce6d8df
Von Hans Peter Schlaepfer vor mehr als 3 Jahren hinzugefügt
templates/webpages/wh/report_filter.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE L %] |
|
3 |
[%- USE P %] |
|
4 |
[%- USE LxERP %] |
|
5 |
[%- USE HTML %][%- USE JavaScript %] |
|
1 |
[% USE T8 %] |
|
2 |
[% USE L %] |
|
3 |
[% USE P %] |
|
4 |
[% USE LxERP %] |
|
5 |
[% USE HTML %] |
|
6 |
[% USE JavaScript %] |
|
7 |
|
|
6 | 8 |
<h1>[% 'Report about warehouse contents' | $T8 %]</h1> |
7 | 9 |
|
8 |
<script type="text/javascript"> |
|
9 |
<!-- |
|
10 |
warehouses = new Array(); |
|
11 |
warehouses[0] = new Array(); |
|
12 |
warehouses[0]['id'] = "0"; |
|
13 |
warehouses[0]['bins'] = new Array(); |
|
14 |
warehouses[0]['bins'][0] = new Array(); |
|
15 |
warehouses[0]['bins'][0]['description'] = "---"; |
|
16 |
warehouses[0]['bins'][0]['id'] = ""; |
|
17 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %] |
|
18 |
warehouses[[% WAREHOUSES_it.count %]] = new Array(); |
|
19 |
warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %]; |
|
20 |
warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array(); |
|
21 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array(); |
|
22 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---"; |
|
23 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = ""; |
|
24 |
[% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %] |
|
10 |
<script type="text/javascript"><!-- |
|
11 |
warehouses = new Array(); |
|
12 |
warehouses[0] = new Array(); |
|
13 |
warehouses[0]['id'] = "0"; |
|
14 |
warehouses[0]['bins'] = new Array(); |
|
15 |
warehouses[0]['bins'][0] = new Array(); |
|
16 |
warehouses[0]['bins'][0]['description'] = "---"; |
|
17 |
warehouses[0]['bins'][0]['id'] = ""; |
|
18 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %] |
|
19 |
[%- FOREACH warehouse = WAREHOUSES_it %] |
|
20 |
warehouses[[% WAREHOUSES_it.count %]] = new Array(); |
|
21 |
warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %]; |
|
22 |
warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array(); |
|
23 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array(); |
|
24 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---"; |
|
25 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = ""; |
|
26 |
[% USE BINS_it = Iterator(warehouse.BINS) %] |
|
27 |
[% FOREACH bin = BINS_it %] |
|
25 | 28 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array(); |
26 | 29 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
27 | 30 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %]; |
28 |
[% END %] |
|
29 |
[% END %] |
|
31 |
[% END %] |
|
32 |
[% END %] |
|
33 |
|
|
34 |
function warehouse_selected(warehouse_id, bin_id) { |
|
35 |
var control = document.getElementById("bin_id"); |
|
30 | 36 |
|
31 |
function warehouse_selected(warehouse_id, bin_id) { |
|
32 |
var control = document.getElementById("bin_id"); |
|
37 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
38 |
control.options[i] = null; |
|
39 |
} |
|
33 | 40 |
|
34 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
35 |
control.options[i] = null; |
|
36 |
} |
|
41 |
var warehouse_index = 0; |
|
37 | 42 |
|
38 |
var warehouse_index = 0; |
|
43 |
for (i = 0; i < warehouses.length; i++) |
|
44 |
if (warehouses[i]['id'] == warehouse_id) { |
|
45 |
warehouse_index = i; |
|
46 |
break; |
|
47 |
} |
|
39 | 48 |
|
40 |
for (i = 0; i < warehouses.length; i++) |
|
41 |
if (warehouses[i]['id'] == warehouse_id) { |
|
42 |
warehouse_index = i; |
|
43 |
break; |
|
44 |
} |
|
49 |
var warehouse = warehouses[warehouse_index]; |
|
50 |
var bin_index = 0; |
|
45 | 51 |
|
46 |
var warehouse = warehouses[warehouse_index]; |
|
47 |
var bin_index = 0; |
|
52 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
53 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
54 |
bin_index = i; |
|
55 |
break; |
|
56 |
} |
|
48 | 57 |
|
49 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
50 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
51 |
bin_index = i; |
|
52 |
break; |
|
53 |
} |
|
58 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
59 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
60 |
} |
|
54 | 61 |
|
55 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
56 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
57 |
} |
|
58 | 62 |
|
63 |
control.options[bin_index].selected = true; |
|
64 |
} |
|
59 | 65 |
|
60 |
control.options[bin_index].selected = true; |
|
61 |
} |
|
66 |
$(function () { |
|
67 |
warehouse_selected(0, 0); |
|
68 |
document.Form.partnumber.focus(); |
|
69 |
}); |
|
62 | 70 |
|
63 |
$(function () { |
|
64 |
warehouse_selected(0, 0); |
|
65 |
document.Form.partnumber.focus(); |
|
66 |
}); |
|
67 |
--> |
|
68 |
</script> |
|
71 |
--></script> |
|
69 | 72 |
|
70 |
<form method="post" name="Form" action="wh.pl" id="form"> |
|
73 |
<form method="post" name="Form" action="wh.pl" id="form"> |
|
74 |
<div class="wrapper"> |
|
71 | 75 |
|
72 |
<input type="hidden" name="nextsub" value="generate_report">
|
|
76 |
<input type="hidden" name="nextsub" value="generate_report"> |
|
73 | 77 |
|
74 |
<table> |
|
78 |
<table class="tbl-horizontal"> |
|
79 |
<tbody> |
|
80 |
<tr> |
|
81 |
<th>[% 'Warehouse' | $T8 %]:</th> |
|
82 |
<td> |
|
83 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-normal"> |
|
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> |
|
75 | 91 |
<tr> |
76 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th> |
|
92 |
<th>[% 'Bin' | $T8 %]:</th> |
|
93 |
<td> |
|
94 |
<select name="bin_id" id="bin_id" class="wi-normal"> |
|
95 |
</select> |
|
96 |
</td> |
|
77 | 97 |
</tr> |
78 |
|
|
79 | 98 |
<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" size=20 value="[% partnumber %]"></td> |
|
100 |
</tr> |
|
101 |
<tr> |
|
102 |
<th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th> |
|
103 |
<td>[% P.part.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>[% 'Qty in stock' | $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>[% 'Stock Qty for Date' | $T8 %]:</th> |
|
138 |
<td>[% L.date_tag('date') %]</td> |
|
139 |
</tr> |
|
140 |
<tr> |
|
141 |
<th align="right"> |
|
142 |
[% "basis for stock value" | $T8 %]: |
|
143 |
</th> |
|
144 |
<td align="left"> |
|
145 |
[% L.radio_button_tag("stock_value_basis", value='purchase_price', checked=1, label=LxERP.t8('Purchase price')) %] |
|
146 |
[% L.radio_button_tag("stock_value_basis", value='list_price', checked=0, label=LxERP.t8('List Price')) %] |
|
147 |
</td> |
|
148 |
</tr> |
|
149 |
<th align="right"> |
|
150 |
[% "List all rows" | $T8 %]: |
|
151 |
</th> |
|
152 |
<td align="left"> |
|
153 |
[% L.yes_no_tag("allrows", 1) %] |
|
154 |
</td> |
|
155 |
</tr> |
|
156 |
|
|
157 |
</table> |
|
158 |
</td> |
|
99 |
<th>[% 'Part Number' | $T8 %]:</th> |
|
100 |
<td><input type="text" name="partnumber" value="[% partnumber %] class="wi-normal"> |
|
101 |
</td> |
|
159 | 102 |
</tr> |
160 |
|
|
161 |
<tr height="5"><td> </td></tr> |
|
162 |
|
|
163 | 103 |
<tr> |
164 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th> |
|
104 |
<th>[% 'Parts Classification' | $T8 %]:</th> |
|
105 |
<td>[% P.part.select_classification('classification_id', class='wi-normal') %]</td> |
|
165 | 106 |
</tr> |
166 |
|
|
167 | 107 |
<tr> |
168 |
<td> |
|
169 |
<input name="l_partdescription" type="hidden" value="Y"> |
|
170 |
<input name="l_qty" type="hidden" value="Y"> |
|
171 |
|
|
172 |
<table> |
|
173 |
<tr> |
|
174 |
<td align="right"><input name="l_warehousedescription" id="l_warehousedescription" class="checkbox" type="checkbox" value="Y" checked></td> |
|
175 |
<td nowrap><label for="l_warehousedescription">[% 'Warehouse' | $T8 %]</label></td> |
|
176 |
<td align="right"><input name="l_bindescription" id="l_bindescription" class="checkbox" type="checkbox" value="Y" checked></td> |
|
177 |
<td nowrap><label for="l_bindescription">[% 'Bin' | $T8 %]</label></td> |
|
178 |
</tr> |
|
179 |
|
|
180 |
<tr> |
|
181 |
<td align="right"><input name="l_partnumber" id="l_partnumber" class="checkbox" type="checkbox" value="Y" checked></td> |
|
182 |
<td nowrap><label for="l_partnumber">[% 'Part Number' | $T8 %]</label></td> |
|
183 |
<td align="right"><input name="l_chargenumber" id="l_chargenumber" class="checkbox" type="checkbox" value="Y" checked></td> |
|
184 |
<td nowrap><label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label></td> |
|
185 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
186 |
<td align="right"><input name="l_bestbefore" id="l_bestbefore" class="checkbox" type="checkbox" value="Y" checked></td> |
|
187 |
<td nowrap><label for="l_bestbefore">[% 'Best Before' | $T8 %]</label></td> |
|
108 |
<th>[% 'Part Description' | $T8 %]:</th> |
|
109 |
<td><input type="text" name="description" class="wi-normal"> |
|
110 |
</td> |
|
111 |
</tr> |
|
112 |
<tr> |
|
113 |
<th>[% 'Charge Number' | $T8 %]:</th> |
|
114 |
<td><input type="text" name="chargenumber" class="wi-normal"> |
|
115 |
</td> |
|
116 |
</tr> |
|
117 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
118 |
<tr> |
|
119 |
<th>[% 'Best Before' | $T8 %]:</th> |
|
120 |
<td><span class="wi-date">[% L.date_tag('bestbefore') %]</span></td> |
|
121 |
</tr> |
|
122 |
[% END %] |
|
123 |
<tr> |
|
124 |
<th>[% 'Qty in stock' | $T8 %]:</th> |
|
125 |
<td> |
|
126 |
<select name="qty_op" class="wi-normal"> |
|
127 |
<option value="dontcare">---</option> |
|
128 |
<option value="atleast">[% 'At least' | $T8 %]</option> |
|
129 |
<option value="atmost">[% 'At most' | $T8 %]</option> |
|
130 |
<option value="exact">[% 'Exact' | $T8 %]</option> |
|
131 |
</select> |
|
132 |
<input type="text" name="qty" class="wi-verysmall"> |
|
133 |
<select name="qty_unit" class="wi-small"> |
|
134 |
[% FOREACH unit = UNITS %] |
|
135 |
<option>[% unit.name %]</option> |
|
188 | 136 |
[% END %] |
189 |
</tr> |
|
190 |
|
|
191 |
<tr><td colspan="6"><hr noshade height="1"></td></tr> |
|
192 |
|
|
193 |
<tr> |
|
194 |
<td align="right"><input name="subtotal" id="subtotal" class="checkbox" type="checkbox" value="Y"></td> |
|
195 |
<td nowrap><label for="subtotal">[% 'Subtotal' | $T8 %]</label></td> |
|
196 |
<td align="right"><input name="include_empty_bins" id="include_empty_bins" class="checkbox" type="checkbox" value="Y"></td> |
|
197 |
<td nowrap><label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label></td> |
|
198 |
<td align="right"><input name="include_invalid_warehouses" id="include_invalid_warehouses" class="checkbox" type="checkbox" value="Y"></td> |
|
199 |
<td nowrap><label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label></td> |
|
200 |
</tr> |
|
201 |
|
|
202 |
<tr> |
|
203 |
<td align="right"><input name="l_stock_value" id="l_stock_value" class="checkbox" type="checkbox" value="Y"></td> |
|
204 |
<td nowrap><label for="l_stock_value">[% 'Stock value' | $T8 %]</label></td> |
|
205 |
<td align="right"><input name="l_purchase_price" id="l_purchase_price" class="checkbox" type="checkbox" value="Y"></td> |
|
206 |
<td nowrap><label for="l_purchase_price">[% 'Purchase price' | $T8 %]</label></td> |
|
207 |
<td align="right"><input name="l_list_price" id="l_list_price" class="checkbox" type="checkbox" value="Y"></td> |
|
208 |
<td nowrap><label for="l_list_price">[% 'List Price' | $T8 %]</label></td> |
|
209 |
</tr> |
|
210 |
</table> |
|
211 |
</td> |
|
137 |
</select> |
|
138 |
</td> |
|
139 |
</tr> |
|
140 |
<tr> |
|
141 |
<th>[% 'Stock Qty for Date' | $T8 %]:</th> |
|
142 |
<td><span class="wi-date">[% L.date_tag('date') %]</span></td> |
|
143 |
</tr> |
|
144 |
<tr> |
|
145 |
<th>[% "basis for stock value" | $T8 %]:</th> |
|
146 |
<td> |
|
147 |
[% L.radio_button_tag("stock_value_basis", value='purchase_price', checked=1, label=LxERP.t8('Purchase price')) %] |
|
148 |
[% L.radio_button_tag("stock_value_basis", value='list_price', checked=0, label=LxERP.t8('List Price')) %] |
|
149 |
</td> |
|
150 |
</tr> |
|
151 |
<tr> |
|
152 |
<th>[% "List all rows" | $T8 %]:</th> |
|
153 |
<td> |
|
154 |
[% L.yes_no_tag("allrows", 1) %] |
|
155 |
</td> |
|
212 | 156 |
</tr> |
213 |
</table> |
|
214 |
</form> |
|
157 |
</tbody> |
|
158 |
</table> |
|
159 |
|
|
160 |
</div><!-- /.wrapper --> |
|
161 |
|
|
162 |
<div class="form-addition control-panel"> |
|
163 |
<h3>[% 'Include in Report' | $T8 %]</h3> |
|
164 |
<input name="l_partdescription" type="hidden" value="Y"> |
|
165 |
<input name="l_qty" type="hidden" value="Y"> |
|
166 |
|
|
167 |
<div class="list col"> |
|
168 |
<h4>[% 'Store & Articles' | $T8 %]</h4> |
|
169 |
<input name="l_warehousedescription" id="l_warehousedescription" type="checkbox" value="Y" checked> |
|
170 |
<label for="l_warehousedescription">[% 'Warehouse' | $T8 %]</label> |
|
171 |
<input name="l_bindescription" id="l_bindescription" type="checkbox" value="Y" checked> |
|
172 |
<label for="l_bindescription">[% 'Bin' | $T8 %]</label> |
|
173 |
<input name="l_partnumber" id="l_partnumber" type="checkbox" value="Y" checked> |
|
174 |
<label for="l_partnumber">[% 'Part Number' | $T8 %]</label> |
|
175 |
<input name="l_chargenumber" id="l_chargenumber" type="checkbox" value="Y" checked> |
|
176 |
<label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label> |
|
177 |
</div> |
|
178 |
<div class="list col"> |
|
179 |
<h4>[% 'Options' | $T8 %]</h4> |
|
180 |
[% IF INSTANCE_CONF.get_show_bestbefore %] <input name="l_bestbefore" id="l_bestbefore" type="checkbox" value="Y" checked> |
|
181 |
<label for="l_bestbefore">[% 'Best Before' | $T8 %]</label> |
|
182 |
[% END %] <input name="subtotal" id="subtotal" type="checkbox" value="Y"> |
|
183 |
<label for="subtotal">[% 'Subtotal' | $T8 %]</label> |
|
184 |
<input name="include_empty_bins" id="include_empty_bins" type="checkbox" value="Y"> |
|
185 |
<label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label> |
|
186 |
<input name="include_invalid_warehouses" id="include_invalid_warehouses" type="checkbox" value="Y"> |
|
187 |
<label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label> |
|
188 |
</div> |
|
189 |
<div class="list col"> |
|
190 |
<h4>[% 'Values & Prices' | $T8 %]</h4> |
|
191 |
<input name="l_stock_value" id="l_stock_value" type="checkbox" value="Y"> |
|
192 |
<label for="l_stock_value">[% 'Stock value' | $T8 %]</label> |
|
193 |
<input name="l_purchase_price" id="l_purchase_price" type="checkbox" value="Y"> |
|
194 |
<label for="l_purchase_price">[% 'Purchase price' | $T8 %]</label> |
|
195 |
<input name="l_list_price" id="l_list_price" type="checkbox" value="Y"> |
|
196 |
<label for="l_list_price">[% 'List Price' | $T8 %]</label> |
|
197 |
</div> |
|
198 |
</div> |
|
199 |
<!-- /.form-addition --> |
|
200 |
|
|
201 |
</form> |
Auch abrufbar als: Unified diff
Neues kivitendo Design Aenderungen in templates/webpages/wh/..