Revision 0a0481f0
Von Hans Peter Schlaepfer vor fast 4 Jahren hinzugefügt
templates/webpages/wh/journal_filter.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE L %] |
|
3 |
[%- USE P %] |
|
4 |
[%- USE HTML %][%- USE JavaScript %] |
|
1 |
[% USE T8 %] |
|
2 |
[% USE L %] |
|
3 |
[% USE P %] |
|
4 |
[% USE HTML %] |
|
5 |
[% USE JavaScript %] |
|
6 |
|
|
5 | 7 |
<h1>[% 'Report about warehouse transactions' | $T8 %]</h1> |
6 | 8 |
|
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 %]
|
|
9 |
<script type="text/javascript"><!--
|
|
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) %]
|
|
18 |
[% FOREACH warehouse = WAREHOUSES_it %]
|
|
17 | 19 |
warehouses[[% WAREHOUSES_it.count %]] = new Array(); |
18 | 20 |
warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %]; |
19 | 21 |
warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array(); |
20 | 22 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array(); |
21 | 23 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---"; |
22 | 24 |
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 %]
|
|
25 |
[% USE BINS_it = Iterator(warehouse.BINS) %] |
|
26 |
[% FOREACH bin = BINS_it %]
|
|
27 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array();
|
|
28 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
|
|
29 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
|
|
28 | 30 |
[% END %] |
31 |
[% END %] |
|
29 | 32 |
|
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 |
} |
|
33 |
function warehouse_selected(warehouse_id, bin_id) { |
|
34 |
var control = document.getElementById("bin_id"); |
|
36 | 35 |
|
37 |
var warehouse_index = 0; |
|
36 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
37 |
control.options[i] = null; |
|
38 |
} |
|
38 | 39 |
|
39 |
for (i = 0; i < warehouses.length; i++) |
|
40 |
if (warehouses[i]['id'] == warehouse_id) { |
|
41 |
warehouse_index = i; |
|
42 |
break; |
|
43 |
} |
|
40 |
var warehouse_index = 0; |
|
44 | 41 |
|
45 |
var warehouse = warehouses[warehouse_index]; |
|
46 |
var bin_index = 0; |
|
42 |
for (i = 0; i < warehouses.length; i++) |
|
43 |
if (warehouses[i]['id'] == warehouse_id) { |
|
44 |
warehouse_index = i; |
|
45 |
break; |
|
46 |
} |
|
47 | 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 |
} |
|
48 |
var warehouse = warehouses[warehouse_index]; |
|
49 |
var bin_index = 0; |
|
53 | 50 |
|
54 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
55 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
51 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
52 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
53 |
bin_index = i; |
|
54 |
break; |
|
56 | 55 |
} |
57 | 56 |
|
58 |
|
|
59 |
control.options[bin_index].selected = true;
|
|
57 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
58 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
|
|
60 | 59 |
} |
61 | 60 |
|
62 |
$(function() { |
|
63 |
warehouse_selected(0, 0); |
|
64 |
document.Form.partnumber.focus(); |
|
65 |
}) |
|
66 |
--> |
|
67 |
</script> |
|
68 | 61 |
|
69 |
<form method="post" name="Form" action="wh.pl" id="form"> |
|
62 |
control.options[bin_index].selected = true; |
|
63 |
} |
|
70 | 64 |
|
71 |
<table> |
|
72 |
<tr> |
|
73 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th> |
|
74 |
</tr> |
|
65 |
$(function() { |
|
66 |
warehouse_selected(0, 0); |
|
67 |
document.Form.partnumber.focus(); |
|
68 |
}) |
|
69 |
--></script> |
|
75 | 70 |
|
71 |
<form method="post" name="Form" action="wh.pl" id="form"> |
|
72 |
<div class="wrapper"> |
|
73 |
|
|
74 |
<table class="tbl-horizontal"> |
|
75 |
<tbody> |
|
76 | 76 |
<tr> |
77 |
<td> |
|
78 |
<table> |
|
79 |
<tr> |
|
80 |
<th align="right" nowrap>[% 'Warehouse' | $T8 %]:</th> |
|
81 |
<td> |
|
82 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)"> |
|
83 |
<option value="">---</option> |
|
84 |
[%- FOREACH warehouse = WAREHOUSES %] |
|
77 |
<th>[% 'Warehouse' | $T8 %]:</th> |
|
78 |
<td> |
|
79 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-normal"> |
|
80 |
<option value="">---</option> |
|
81 |
[% FOREACH warehouse = WAREHOUSES %] |
|
85 | 82 |
<option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option> |
86 |
[%- END %] |
|
87 |
</select> |
|
88 |
</td> |
|
89 |
</tr> |
|
90 |
<tr> |
|
91 |
<th align="right" nowrap>[% 'Bin' | $T8 %]:</th> |
|
92 |
<td><select name="bin_id" id="bin_id"></select></td> |
|
93 |
</tr> |
|
94 |
<tr> |
|
95 |
<th align="right" nowrap>[% 'Part Number' | $T8 %]:</th> |
|
96 |
<td><input name="partnumber" id="partnumber" size=20 value="[% partnumber %]"></td> |
|
97 |
</tr> |
|
98 |
<tr> |
|
99 |
<th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th> |
|
100 |
<td>[% P.part.select_classification('classification_id') %]</td> |
|
101 |
</tr> |
|
102 |
<tr> |
|
103 |
<th align="right" nowrap>[% 'Part Description' | $T8 %]:</th> |
|
104 |
<td><input name="description" size=40></td> |
|
105 |
</tr> |
|
106 |
<tr> |
|
107 |
<th align="right" nowrap>[% 'Charge Number' | $T8 %]:</th> |
|
108 |
<td><input name="chargenumber" size=40></td> |
|
109 |
</tr> |
|
110 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
111 |
<tr> |
|
112 |
<th align="right" nowrap>[% 'Best Before' | $T8 %]:</th> |
|
113 |
<td> |
|
114 |
[% L.date_tag('bestbefore') %] |
|
115 |
</td> |
|
116 |
</tr> |
|
117 |
[% END %] |
|
118 |
<tr> |
|
119 |
<th align="right" nowrap>[% 'Transfer Quantity' | $T8 %]:</th> |
|
120 |
<td> |
|
121 |
<select name="qty_op"> |
|
83 |
[% END %] |
|
84 |
</select> |
|
85 |
</td> |
|
86 |
</tr> |
|
87 |
<tr> |
|
88 |
<th>[% 'Bin' | $T8 %]:</th> |
|
89 |
<td> |
|
90 |
<select name="bin_id" id="bin_id" class="wi-normal"> |
|
91 |
</select> |
|
92 |
</td> |
|
93 |
</tr> |
|
94 |
<tr> |
|
95 |
<th>[% 'Part Number' | $T8 %]:</th> |
|
96 |
<td><input type="text" name="partnumber" id="partnumber" value="[% partnumber %] class="wi-normal"> |
|
97 |
</td> |
|
98 |
</tr> |
|
99 |
<tr> |
|
100 |
<th>[% 'Parts Classification' | $T8 %]:</th> |
|
101 |
<td>[% P.part.select_classification('classification_id', class='wi-normal') %]</td> |
|
102 |
</tr> |
|
103 |
<tr> |
|
104 |
<th>[% 'Part Description' | $T8 %]:</th> |
|
105 |
<td><input type="text" name="description" class="wi-normal"> |
|
106 |
</td> |
|
107 |
</tr> |
|
108 |
<tr> |
|
109 |
<th>[% 'Charge Number' | $T8 %]:</th> |
|
110 |
<td><input type="text" name="chargenumber" class="wi-normal"> |
|
111 |
</td> |
|
112 |
</tr> |
|
113 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
114 |
<tr> |
|
115 |
<th>[% 'Best Before' | $T8 %]:</th> |
|
116 |
<td> [% L.date_tag('bestbefore') %] </td> |
|
117 |
</tr> |
|
118 |
[% END %] |
|
119 |
<tr> |
|
120 |
<th>[% 'Transfer Quantity' | $T8 %]:</th> |
|
121 |
<td> |
|
122 |
<select name="qty_op" class="wi-normal"> |
|
122 | 123 |
<option value="dontcare">---</option> |
123 | 124 |
<option value="atleast">[% 'At least' | $T8 %]</option> |
124 | 125 |
<option value="atmost">[% 'At most' | $T8 %]</option> |
125 | 126 |
<option value="exact">[% 'Exact' | $T8 %]</option> |
126 |
</select> |
|
127 |
<input name="qty"> |
|
128 |
<select name="qty_unit"> |
|
129 |
[%- FOREACH unit = UNITS %]<option>[% unit.name %]</option>[% END %] |
|
130 |
</select> |
|
131 |
</td> |
|
132 |
</tr> |
|
133 |
<tr> |
|
134 |
<th align="right" nowrap>[% 'From Date' | $T8 %]</th> |
|
135 |
<td> |
|
136 |
[% L.date_tag('fromdate') %] |
|
137 |
</td> |
|
138 |
</tr> |
|
139 |
<tr> |
|
140 |
<th align="right">[% 'To Date' | $T8 %]</th> |
|
141 |
<td> |
|
142 |
[% L.date_tag('todate') %] |
|
143 |
</td> |
|
144 |
</tr> |
|
145 |
</table> |
|
146 |
</td> |
|
127 |
</select> |
|
128 |
<input name="qty" type="text" class="wi-verysmall"> |
|
129 |
<select name="qty_unit" class="wi-small"> |
|
130 |
[% FOREACH unit = UNITS %] |
|
131 |
<option>[% unit.name %]</option> |
|
132 |
[% END %] |
|
133 |
</select> |
|
134 |
</td> |
|
147 | 135 |
</tr> |
148 |
|
|
149 |
<tr height="5"><td> </td></tr> |
|
150 |
|
|
151 | 136 |
<tr> |
152 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th> |
|
137 |
<th>[% 'From Date' | $T8 %]</th> |
|
138 |
<td> <span class="wi-date">[% L.date_tag('fromdate') %]</span> </td> |
|
153 | 139 |
</tr> |
154 |
|
|
155 | 140 |
<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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</label></td> |
|
171 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</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' | $T8 %]</label></td> |
|
201 |
</tr> |
|
202 |
</table> |
|
203 |
</td> |
|
141 |
<th>[% 'To Date' | $T8 %]</th> |
|
142 |
<td> <span class="wi-date">[% L.date_tag('todate') %]</span> </td> |
|
204 | 143 |
</tr> |
205 |
</table> |
|
206 |
</form> |
|
144 |
</tbody> |
|
145 |
</table> |
|
146 |
|
|
147 |
</div><!-- /.wrapper --> |
|
148 |
|
|
149 |
<div class="form-addition control-panel"> |
|
150 |
<h3>[% 'Include in Report' | $T8 %]</h3> |
|
151 |
|
|
152 |
<div class="col list"> |
|
153 |
<h4>[% 'Article data' | $T8 %]</h4> |
|
154 |
<div> |
|
155 |
<input name="l_partdescription" id="l_partdescription" type="checkbox" value="Y" checked> |
|
156 |
<label for="l_partdescription">[% 'Part Description' | $T8 %]</label> |
|
157 |
</div> |
|
158 |
<div> |
|
159 |
<input name="l_partnumber" id="l_partnumber" type="checkbox" value="Y" checked> |
|
160 |
<label for="l_partnumber">[% 'Part Number' | $T8 %]</label> |
|
161 |
</div> |
|
162 |
<div> |
|
163 |
<input name="l_chargenumber" id="l_chargenumber" type="checkbox" value="Y" checked> |
|
164 |
<label for="l_chargenumber">[% 'Charge Number' | $T8 %]</label> |
|
165 |
</div> |
|
166 |
<div> |
|
167 |
<input name="l_qty" id="l_qty" type="checkbox" value="Y" checked> |
|
168 |
<label for="l_qty">[% 'Quantity' | $T8 %]</label> |
|
169 |
</div> |
|
170 |
</div> |
|
171 |
|
|
172 |
<div class="col list"> |
|
173 |
<h4>[% 'Storage' | $T8 %]</h4> |
|
174 |
<div> |
|
175 |
<input name="l_warehouse_from" id="l_warehouse_from" type="checkbox" value="Y" checked> |
|
176 |
<label for="l_warehouse_from">[% 'Warehouse From' | $T8 %]</label> |
|
177 |
</div> |
|
178 |
<div> |
|
179 |
<input name="l_bin_from" id="l_bin_from" type="checkbox" value="Y" checked> |
|
180 |
<label for="l_bin_from">[% 'Bin From' | $T8 %]</label> |
|
181 |
</div> |
|
182 |
<div> |
|
183 |
<input name="l_warehouse_to" id="l_warehouse_to" type="checkbox" value="Y" checked> |
|
184 |
<label for="l_warehouse_to">[% 'Warehouse To' | $T8 %]</label> |
|
185 |
</div> |
|
186 |
<div> |
|
187 |
<input name="l_bin_to" id="l_bin_to" type="checkbox" value="Y" checked> |
|
188 |
<label for="l_bin_to">[% 'Bin To' | $T8 %]</label> |
|
189 |
</div> |
|
190 |
</div> |
|
191 |
|
|
192 |
<div class="col list"> |
|
193 |
<h4>[% 'Miscellaneous' | $T8 %]</h4> |
|
194 |
<div> |
|
195 |
<input name="l_date" id="l_date" type="checkbox" value="Y" checked> |
|
196 |
<label for="l_date">[% 'Date' | $T8 %]</label> |
|
197 |
</div> |
|
198 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
199 |
<div> |
|
200 |
<input name="l_bestbefore" id="l_bestbefore" type="checkbox" value="Y" checked> |
|
201 |
<label for="l_bestbefore">[% 'Best Before' | $T8 %]</label> |
|
202 |
</div> |
|
203 |
[% END %] |
|
204 |
<div> |
|
205 |
<input name="l_trans_id" id="l_trans_id" type="checkbox" value="Y"> |
|
206 |
<label for="l_trans_id">[% 'Trans Id' | $T8 %]</label> |
|
207 |
</div> |
|
208 |
<div> |
|
209 |
<input name="l_trans_type" id="l_trans_type" type="checkbox" value="Y" checked> |
|
210 |
<label for="l_trans_type">[% 'Trans Type' | $T8 %]</label> |
|
211 |
</div> |
|
212 |
<div> |
|
213 |
<input name="l_comment" id="l_comment" type="checkbox" value="Y"> |
|
214 |
<label for="l_comment">[% 'Comment' | $T8 %]</label> |
|
215 |
</div> |
|
216 |
<div> |
|
217 |
<input name="l_employee" id="l_employee" type="checkbox" value="Y"> |
|
218 |
<label for="l_employee">[% 'Employee' | $T8 %]</label> |
|
219 |
</div> |
|
220 |
<div> |
|
221 |
<input name="l_oe_id" id="l_oe_id" type="checkbox" value="Y"> |
|
222 |
<label for="l_oe_id">[% 'Document' | $T8 %]</label> |
|
223 |
</div> |
|
224 |
<div> |
|
225 |
<input name="l_projectnumber" id="l_projectnumber" type="checkbox" value="Y" checked> |
|
226 |
<label for="l_projectnumber">[% 'Project Number' | $T8 %]</label> |
|
227 |
</div> |
|
228 |
</div> |
|
229 |
|
|
230 |
</div><!-- /.form-addition --> |
|
231 |
|
|
232 |
|
|
233 |
</form> |
templates/webpages/wh/removal_parts_selection.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE HTML %][%- USE JavaScript %] |
|
1 |
[% USE T8 %] |
|
2 |
[% USE HTML %] |
|
3 |
[% USE JavaScript %] |
|
4 |
|
|
3 | 5 |
<h1>[% title %]</h1> |
4 | 6 |
|
5 | 7 |
<form method="post" action="wh.pl" id="form"> |
... | ... | |
8 | 10 |
|
9 | 11 |
<p>[% 'Removal from warehouse' | $T8 %]: [% warehouse_description %]</p> |
10 | 12 |
|
11 |
<p> |
|
12 | 13 |
<table> |
13 | 14 |
<tr> |
14 | 15 |
<td>[% 'Select type of removal' | $T8 %]:</td> |
15 | 16 |
<td> |
16 | 17 |
<select name="transfer_type_id"> |
17 |
[%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% HTML.escape(type.description) %]</option>[% END %]
|
|
18 |
[% FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% HTML.escape(type.description) %]</option>[% END %] |
|
18 | 19 |
</select> |
19 | 20 |
</td> |
20 | 21 |
</tr> |
21 |
|
|
22 | 22 |
<tr> |
23 | 23 |
<td>[% 'Optional comment' | $T8 %]:</td> |
24 |
<td><input name="comment" size="60"></td> |
|
24 |
<td><input type="text" name="comment" size="60"></td>
|
|
25 | 25 |
</tr> |
26 | 26 |
</table> |
27 |
</p> |
|
28 | 27 |
|
29 |
<p> |
|
30 | 28 |
<table> |
31 | 29 |
<tr> |
32 |
<th class="listheading">[% 'Bin' | $T8 %]</th>
|
|
33 |
<th class="listheading">[% 'Part Number' | $T8 %]</th>
|
|
34 |
<th class="listheading">[% 'Part Description' | $T8 %]</th>
|
|
35 |
<th class="listheading">[% 'Charge Number' | $T8 %]</th>
|
|
30 |
<th>[% 'Bin' | $T8 %]</th> |
|
31 |
<th>[% 'Part Number' | $T8 %]</th> |
|
32 |
<th>[% 'Part Description' | $T8 %]</th> |
|
33 |
<th>[% 'Charge Number' | $T8 %]</th> |
|
36 | 34 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
37 |
<th class="listheading">[% 'Best Before' | $T8 %]</th>
|
|
35 |
<th>[% 'Best Before' | $T8 %]</th> |
|
38 | 36 |
[% END %] |
39 |
<th class="listheading">[% 'EAN' | $T8 %]</th>
|
|
40 |
<th class="listheading">[% 'Available qty' | $T8 %]</th>
|
|
41 |
<th class="listheading">[% 'Removal qty' | $T8 %]</th>
|
|
37 |
<th>[% 'EAN' | $T8 %]</th> |
|
38 |
<th>[% 'Available qty' | $T8 %]</th> |
|
39 |
<th>[% 'Removal qty' | $T8 %]</th> |
|
42 | 40 |
</tr> |
43 |
|
|
44 | 41 |
[% FOREACH row = CONTENTS %] |
45 | 42 |
<tr class="listrow[% loop.count % 2 %]"> |
46 | 43 |
<input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]"> |
... | ... | |
62 | 59 |
<td>[% HTML.escape(row.ean) %]</td> |
63 | 60 |
<td>[% HTML.escape(row.qty) %]</td> |
64 | 61 |
<td> |
65 |
<input name="qty_[% loop.count %]"> |
|
62 |
<input type="text" name="qty_[% loop.count %]">
|
|
66 | 63 |
<select name="unit_[% loop.count %]"> |
67 | 64 |
[% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %] |
68 | 65 |
</select> |
69 | 66 |
</td> |
70 | 67 |
</tr> |
71 |
|
|
72 | 68 |
[% END %] |
73 |
|
|
74 | 69 |
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]"> |
75 |
|
|
76 | 70 |
<tr><td colspan="7"><hr size="3" noshade></td></tr> |
77 |
|
|
78 | 71 |
</table> |
79 |
</p> |
|
80 | 72 |
</form> |
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> |
templates/webpages/wh/transfer_parts_selection.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE HTML %][%- USE JavaScript %] |
|
1 |
[% USE T8 %] |
|
2 |
[% USE HTML %] |
|
3 |
[% USE JavaScript %] |
|
4 |
|
|
3 | 5 |
<h1>[% title %]</h1> |
4 | 6 |
|
5 |
<script type="text/javascript"> |
|
6 |
<!-- |
|
7 |
warehouses = new Array(); |
|
8 |
[% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %] |
|
9 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
10 |
[% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"]; |
|
11 |
[% END %] |
|
12 |
[% END %] |
|
7 |
<script type="text/javascript"><!-- |
|
8 |
warehouses = new Array(); |
|
9 |
[% USE WAREHOUSES_it = Iterator(WAREHOUSES) %] |
|
10 |
[% FOREACH wh = WAREHOUSES_it %] |
|
11 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
12 |
[% USE BINS_it = Iterator(wh.BINS) %] |
|
13 |
[% FOREACH bin = BINS_it %] |
|
14 |
warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"]; |
|
15 |
[% END %] |
|
16 |
[% END %] |
|
13 | 17 |
|
14 |
function warehouse_selected(row, index) {
|
|
15 |
var cname = "dst_bin_id_" + row;
|
|
16 |
var control = document.getElementById(cname);
|
|
18 |
function warehouse_selected(row, index) { |
|
19 |
var cname = "dst_bin_id_" + row; |
|
20 |
var control = document.getElementById(cname); |
|
17 | 21 |
|
18 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
19 |
control.options[i] = null;
|
|
20 |
}
|
|
22 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
23 |
control.options[i] = null; |
|
24 |
} |
|
21 | 25 |
|
22 |
for (i = 0; i < warehouses[index].length; i++) {
|
|
23 |
control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
|
|
24 |
}
|
|
26 |
for (i = 0; i < warehouses[index].length; i++) { |
|
27 |
control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]); |
|
28 |
} |
|
25 | 29 |
|
26 |
control.options[0].selected = true;
|
|
27 |
}
|
|
30 |
control.options[0].selected = true; |
|
31 |
} |
|
28 | 32 |
|
29 |
$(function() { |
|
30 |
[% FOREACH row = CONTENTS %] |
|
31 |
warehouse_selected([% loop.count %], [% initial_warehouse_idx %]); |
|
32 |
[% END %] |
|
33 |
}); |
|
34 |
--> |
|
35 |
</script> |
|
33 |
$(function() { |
|
34 |
[% FOREACH row = CONTENTS %] |
|
35 |
warehouse_selected([% loop.count %], [% initial_warehouse_idx %]); |
|
36 |
[% END %] |
|
37 |
}); |
|
38 |
--></script> |
|
36 | 39 |
|
37 |
<form method="post" action="wh.pl" id="form">
|
|
40 |
<form method="post" action="wh.pl" id="form"> |
|
38 | 41 |
|
39 |
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
|
|
42 |
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]"> |
|
40 | 43 |
|
41 |
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
|
|
44 |
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p> |
|
42 | 45 |
|
43 |
<p>
|
|
44 |
<table>
|
|
46 |
<table class="tbl-horizontal">
|
|
47 |
<tbody>
|
|
45 | 48 |
<tr> |
46 |
<td>[% 'Select type of transfer' | $T8 %]:</td> |
|
47 |
<td> |
|
48 |
<select name="transfer_type_id"> |
|
49 |
[%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %] |
|
50 |
</select> |
|
51 |
</td> |
|
49 |
<th>[% 'Select type of transfer' | $T8 %]:</th> |
|
50 |
<td> |
|
51 |
<select name="transfer_type_id"> |
|
52 |
[% FOREACH type = TRANSFER_TYPES %] |
|
53 |
<option value="[% HTML.escape(type.id) %]">[% type.description %]</option> |
|
54 |
[% END %] |
|
55 |
</select> |
|
56 |
</td> |
|
52 | 57 |
</tr> |
53 |
|
|
54 | 58 |
<tr> |
55 |
<td>[% 'Optional comment' | $T8 %]:</td>
|
|
56 |
<td><input name="comment" size="20"></td>
|
|
59 |
<th>[% 'Optional comment' | $T8 %]:</th>
|
|
60 |
<td><input type="text" name="comment" size="20"></td>
|
|
57 | 61 |
</tr> |
58 | 62 |
<tr> |
59 |
<td>[% 'Change default bin for this parts' | $T8 %]:</td>
|
|
60 |
<td><input type="checkbox" name="change_default_bin"<td>
|
|
63 |
<td>[% 'Change default bin for this parts' | $T8 %]:</th>
|
|
64 |
<td><input type="checkbox" name="change_default_bin"><td>
|
|
61 | 65 |
</tr> |
62 |
</table>
|
|
63 |
</p>
|
|
66 |
</tbody>
|
|
67 |
</table>
|
|
64 | 68 |
|
65 |
<p>
|
|
66 |
<table>
|
|
69 |
<table class="tbl-list">
|
|
70 |
<thead>
|
|
67 | 71 |
<tr> |
68 |
<th class="listheading">[% 'Source bin' | $T8 %]</th>
|
|
69 |
<th class="listheading">[% 'Part Number' | $T8 %]</th>
|
|
70 |
<th class="listheading">[% 'Part Description' | $T8 %]</th>
|
|
71 |
<th class="listheading">[% 'Charge Number' | $T8 %]</th>
|
|
72 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
73 |
<th class="listheading">[% 'Best Before' | $T8 %]</th>
|
|
74 |
[% END %] |
|
75 |
<th class="listheading">[% 'EAN' | $T8 %]</th>
|
|
76 |
<th class="listheading">[% 'Available qty' | $T8 %]</th>
|
|
77 |
<th class="listheading" colspan="2">[% 'Transfer qty' | $T8 %]</th>
|
|
78 |
<th class="listheading" colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
|
|
72 |
<th>[% 'Source bin' | $T8 %]</th>
|
|
73 |
<th>[% 'Part Number' | $T8 %]</th>
|
|
74 |
<th>[% 'Part Description' | $T8 %]</th>
|
|
75 |
<th>[% 'Charge Number' | $T8 %]</th>
|
|
76 |
[% IF INSTANCE_CONF.get_show_bestbefore %]
|
|
77 |
<th>[% 'Best Before' | $T8 %]</th>
|
|
78 |
[% END %]
|
|
79 |
<th>[% 'EAN' | $T8 %]</th>
|
|
80 |
<th>[% 'Available qty' | $T8 %]</th>
|
|
81 |
<th colspan="2">[% 'Transfer qty' | $T8 %]</th>
|
|
82 |
<th colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
|
|
79 | 83 |
</tr> |
80 |
|
|
84 |
</thead> |
|
85 |
<tbody> |
|
81 | 86 |
[% FOREACH row = CONTENTS %] |
82 |
<tr class="listrow[% loop.count % 2 %]"> |
|
83 |
<input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]"> |
|
84 |
<input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]"> |
|
85 |
<input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]"> |
|
86 |
<input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]"> |
|
87 |
<input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"> |
|
88 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
89 |
<input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]"> |
|
90 |
[% END %] |
|
91 |
<input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]"> |
|
92 |
<td>[% HTML.escape(row.bindescription) %]</td> |
|
93 |
<td>[% HTML.escape(row.partnumber) %]</td> |
|
94 |
<td>[% HTML.escape(row.partdescription) %]</td> |
|
95 |
<td>[% HTML.escape(row.chargenumber) %]</td> |
|
96 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
97 |
<td>[% HTML.escape(row.bestbefore) %]</td> |
|
98 |
[% END %] |
|
99 |
<td>[% HTML.escape(row.ean) %]</td> |
|
100 |
<td>[% HTML.escape(row.qty) %]</td> |
|
101 |
<td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td> |
|
102 |
<td> |
|
103 |
<select name="unit_[% loop.count %]"> |
|
104 |
[% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %] |
|
105 |
</select> |
|
106 |
</td> |
|
107 |
|
|
108 |
<td> |
|
109 |
<select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)"> |
|
110 |
[% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %] |
|
111 |
</select> |
|
112 |
</td> |
|
113 |
<td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td> |
|
114 |
</tr> |
|
115 |
|
|
87 |
<tr> |
|
88 |
<td> |
|
89 |
<input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]"> |
|
90 |
<input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]"> |
|
91 |
<input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]"> |
|
92 |
<input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]"> |
|
93 |
<input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"> |
|
94 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
95 |
<input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]"> |
|
96 |
[% END %] |
|
97 |
<input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]"> |
|
98 |
[% HTML.escape(row.bindescription) %] |
|
99 |
</td> |
|
100 |
<td>[% HTML.escape(row.partnumber) %]</td> |
|
101 |
<td>[% HTML.escape(row.partdescription) %]</td> |
|
102 |
<td>[% HTML.escape(row.chargenumber) %]</td> |
|
103 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
104 |
<td>[% HTML.escape(row.bestbefore) %]</td> |
|
105 |
[% END %] |
|
106 |
<td>[% HTML.escape(row.ean) %]</td> |
|
107 |
<td>[% HTML.escape(row.qty) %]</td> |
|
108 |
<td><input type="text" name="qty_[% loop.count %]" size="8" style="text-align: right"></td> |
|
109 |
<td> |
|
110 |
<select name="unit_[% loop.count %]"> |
|
111 |
[% FOREACH unit = row.UNITS %] |
|
112 |
<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option> |
|
113 |
[% END %] |
|
114 |
</select> |
|
115 |
</td> |
|
116 |
<td> |
|
117 |
<select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)"> |
|
118 |
[% FOREACH wh = WAREHOUSES %] |
|
119 |
<option value="[% HTML.escape(wh.id) %]" [% if wh.selected %] selected[% end %]>[% HTML.escape(wh.description) %]</option> |
|
120 |
[% END %] |
|
121 |
</select> |
|
122 |
</td> |
|
123 |
<td> |
|
124 |
<select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select> |
|
125 |
</td> |
|
126 |
</tr> |
|
116 | 127 |
[% END %] |
128 |
</tbody> |
|
129 |
</table> |
|
117 | 130 |
|
118 |
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
|
|
131 |
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]"> |
|
119 | 132 |
|
120 |
</table> |
|
121 |
</p> |
|
122 |
</form> |
|
133 |
</form> |
templates/webpages/wh/warehouse_selection.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE HTML %] |
|
3 |
[%- USE L %] |
|
4 |
[%- USE JavaScript %][%- USE P -%] |
|
1 |
[% USE T8 %] |
|
2 |
[% USE HTML %] |
|
3 |
[% USE L %] |
|
4 |
[% USE JavaScript %] |
|
5 |
[% USE P %] |
|
6 |
|
|
5 | 7 |
<h1>[% title %]</h1> |
6 | 8 |
|
7 |
<script type="text/javascript"> |
|
8 |
<!-- |
|
9 |
warehouses = new Array(); |
|
10 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %] |
|
11 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
12 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %]; |
|
13 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array(); |
|
14 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0] = new Array(); |
|
15 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['description'] = "---"; |
|
16 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['id'] = ""; |
|
17 |
[% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %] |
|
9 |
<script type="text/javascript"><!-- |
|
10 |
warehouses = new Array(); |
|
11 |
[% USE WAREHOUSES_it = Iterator(WAREHOUSES) %] |
|
12 |
[% FOREACH warehouse = WAREHOUSES_it %] |
|
13 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
14 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %]; |
|
15 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array(); |
|
16 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0] = new Array(); |
|
17 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['description'] = "---"; |
|
18 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['id'] = ""; |
|
19 |
[% USE BINS_it = Iterator(warehouse.BINS) %] |
|
20 |
[% FOREACH bin = BINS_it %] |
|
18 | 21 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]] = new Array(); |
19 | 22 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
20 | 23 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %]; |
21 |
[% END %]
|
|
22 |
[% END %]
|
|
24 |
[% END %] |
|
25 |
[% END %] |
|
23 | 26 |
|
24 |
function warehouse_selected(warehouse_id, bin_id) {
|
|
25 |
var control = document.getElementById("bin_id");
|
|
27 |
function warehouse_selected(warehouse_id, bin_id) { |
|
28 |
var control = document.getElementById("bin_id"); |
|
26 | 29 |
|
27 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
28 |
control.options[i] = null;
|
|
29 |
}
|
|
30 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
31 |
control.options[i] = null; |
|
32 |
} |
|
30 | 33 |
|
31 |
var warehouse_index = 0;
|
|
34 |
var warehouse_index = 0; |
|
32 | 35 |
|
33 |
for (i = 0; i < warehouses.length; i++)
|
|
34 |
if (warehouses[i]['id'] == warehouse_id) {
|
|
35 |
warehouse_index = i;
|
|
36 |
break;
|
|
37 |
}
|
|
36 |
for (i = 0; i < warehouses.length; i++) |
|
37 |
if (warehouses[i]['id'] == warehouse_id) { |
|
38 |
warehouse_index = i; |
|
39 |
break; |
|
40 |
} |
|
38 | 41 |
|
39 |
var warehouse = warehouses[warehouse_index];
|
|
40 |
var bin_index = 0;
|
|
42 |
var warehouse = warehouses[warehouse_index]; |
|
43 |
var bin_index = 0; |
|
41 | 44 |
|
42 |
for (i = 0; i < warehouse['bins'].length; i++)
|
|
43 |
if (warehouse['bins'][i]['id'] == bin_id) {
|
|
44 |
bin_index = i;
|
|
45 |
break;
|
|
46 |
}
|
|
45 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
46 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
47 |
bin_index = i; |
|
48 |
break; |
|
49 |
} |
|
47 | 50 |
|
48 |
for (i = 0; i < warehouse['bins'].length; i++) {
|
|
49 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
|
|
50 |
}
|
|
51 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
52 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
53 |
} |
|
51 | 54 |
|
52 | 55 |
|
53 |
control.options[bin_index].selected = true;
|
|
54 |
}
|
|
56 |
control.options[bin_index].selected = true; |
|
57 |
} |
|
55 | 58 |
|
56 | 59 |
$(function() { |
57 | 60 |
warehouse_selected(0, 0); |
... | ... | |
60 | 63 |
--> |
61 | 64 |
</script> |
62 | 65 |
|
63 |
<form name="Form" method="post" action="wh.pl" id="form"> |
|
66 |
<form name="Form" method="post" action="wh.pl" id="form"> |
|
67 |
<div class="wrapper"> |
|
64 | 68 |
|
65 |
[% IF saved_message %]
|
|
69 |
[% IF saved_message %] |
|
66 | 70 |
<p>[% saved_message %]</p> |
67 |
[% END %]
|
|
71 |
[% END %] |
|
68 | 72 |
|
69 |
<p> |
|
70 |
[% 'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' | $T8 %] |
|
71 |
</p> |
|
73 |
<p>[% 'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' | $T8 %]</p> |
|
72 | 74 |
|
73 |
<p>
|
|
74 |
<table>
|
|
75 |
<table class="tbl-horizontal">
|
|
76 |
<tbody>
|
|
75 | 77 |
<tr> |
76 |
<th align="right" nowrap>[% 'Transfer from warehouse' | $T8 %]:</th>
|
|
77 |
<td> |
|
78 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
|
|
79 |
[%- FOREACH warehouse = WAREHOUSES %]
|
|
80 |
<option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option> |
|
81 |
[%- END %]
|
|
82 |
</select> |
|
83 |
</td> |
|
78 |
<th>[% 'Transfer from warehouse' | $T8 %]</th>
|
|
79 |
<td>
|
|
80 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-lightwide">
|
|
81 |
[% FOREACH warehouse = WAREHOUSES %]
|
|
82 |
<option value="[% HTML.escape(warehouse.id) %]">[% warehouse.description %]</option>
|
|
83 |
[% END %]
|
|
84 |
</select>
|
|
85 |
</td>
|
|
84 | 86 |
</tr> |
85 |
|
|
86 | 87 |
<tr> |
87 |
<th align="right" nowrap>[% 'Bin' | $T8 %]:</th> |
|
88 |
<td><select id="bin_id" name="bin_id"></select></td> |
|
88 |
<th>[% 'Bin' | $T8 %]</th> |
|
89 |
<td> |
|
90 |
<select id="bin_id" name="bin_id" class="wi-lightwide"></select> |
|
91 |
</td> |
|
89 | 92 |
</tr> |
90 |
|
|
91 | 93 |
<tr> |
92 |
<th align="right" nowrap>[% 'Limit part selection' | $T8 %]:</th>
|
|
93 |
<td></td>
|
|
94 |
<th>[% 'Limit part selection' | $T8 %]</th>
|
|
95 |
<td><span class="plain-data"> </span></td>
|
|
94 | 96 |
</tr> |
95 |
|
|
96 | 97 |
<tr> |
97 |
<th align="right" nowrap>[% 'Part' | $T8 %]</th> |
|
98 |
<td> |
|
99 |
[% P.part.picker("part_id", parts_id, size="30", part_type="part,assembly") %] |
|
100 |
</td> |
|
98 |
<th>[% 'Part' | $T8 %]</th> |
|
99 |
<td>[% P.part.picker("part_id", parts_id, part_type="part,assembly", class="wi-lightwide") %]</td> |
|
101 | 100 |
</tr> |
102 |
|
|
103 | 101 |
<tr> |
104 |
<th align="right" nowrap>[% 'Charge number' | $T8 %]</th>
|
|
105 |
<td><input name="chargenumber" size="30"></td>
|
|
102 |
<th>[% 'Charge number' | $T8 %]</th>
|
|
103 |
<td><input type="text" name="chargenumber" class="wi-lightwide"></td>
|
|
106 | 104 |
</tr> |
107 |
|
|
108 | 105 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
109 |
<tr> |
|
110 |
<th align="right" nowrap>[% 'Best Before' | $T8 %]</th> |
|
111 |
<td> |
|
112 |
[% L.date_tag('bestbefore') %] |
|
113 |
</td> |
|
114 |
</tr> |
|
106 |
<tr> |
|
107 |
<th>[% 'Best Before' | $T8 %]</th> |
|
108 |
<td><span class="wi-date">[% L.date_tag('bestbefore') %]</span></td> |
|
109 |
</tr> |
|
115 | 110 |
[% END %] |
116 |
|
|
117 | 111 |
<tr> |
118 |
<th align="right" nowrap>[% 'EAN' | $T8 %]</th>
|
|
119 |
<td><input name="ean" size="30"></td>
|
|
112 |
<th>[% 'EAN' | $T8 %]</th>
|
|
113 |
<td><input type="text" name="ean" class="wi-lightwide"></td>
|
|
120 | 114 |
</tr> |
121 |
</table> |
|
122 |
</p> |
|
123 |
</form> |
|
115 |
</tbody> |
|
116 |
</table> |
|
117 |
|
|
118 |
</div><!-- /.wrapper --> |
|
119 |
</form> |
templates/webpages/wh/warehouse_selection_assembly.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE L %] |
|
3 |
[%- USE HTML %][%- USE JavaScript %][%- USE LxERP %][%- USE P -%] |
|
1 |
[% USE T8 %] |
|
2 |
[% USE L %] |
|
3 |
[% USE HTML %] |
|
4 |
[% USE JavaScript %] |
|
5 |
[% USE LxERP %] |
|
6 |
[% USE P %] |
|
7 |
|
|
4 | 8 |
<h1>[% title %]</h1> |
5 | 9 |
|
6 |
<script type="text/javascript"> |
|
7 |
<!-- |
|
8 |
warehouses = new Array(); |
|
9 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %] |
|
10 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
11 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %]; |
|
12 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array(); |
|
13 |
[% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %] |
|
10 |
<script type="text/javascript"><!-- |
|
11 |
warehouses = new Array(); |
|
12 |
[% USE WAREHOUSES_it = Iterator(WAREHOUSES) %] |
|
13 |
[% FOREACH warehouse = WAREHOUSES_it %] |
|
14 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
15 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %]; |
|
16 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array(); |
|
17 |
[% USE BINS_it = Iterator(warehouse.BINS) %] |
|
18 |
[% FOREACH bin = BINS_it %] |
|
14 | 19 |
warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]] = new Array(); |
15 | 20 |
warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
16 | 21 |
warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['id'] = [% bin.id %]; |
17 |
[% END %]
|
|
18 |
[% END %]
|
|
22 |
[% END %] |
|
23 |
[% END %] |
|
19 | 24 |
|
20 |
function warehouse_selected(warehouse_id, bin_id) {
|
|
21 |
var control = document.getElementById("bin_id");
|
|
25 |
function warehouse_selected(warehouse_id, bin_id) { |
|
26 |
var control = document.getElementById("bin_id"); |
|
22 | 27 |
|
23 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
24 |
control.options[i] = null;
|
|
25 |
}
|
|
28 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
29 |
control.options[i] = null; |
|
30 |
} |
|
26 | 31 |
|
27 |
var warehouse_index = 0;
|
|
32 |
var warehouse_index = 0; |
|
28 | 33 |
|
29 |
for (i = 0; i < warehouses.length; i++)
|
|
30 |
if (warehouses[i]['id'] == warehouse_id) {
|
|
31 |
warehouse_index = i;
|
|
32 |
break;
|
|
33 |
}
|
|
34 |
for (i = 0; i < warehouses.length; i++) |
|
35 |
if (warehouses[i]['id'] == warehouse_id) { |
|
36 |
warehouse_index = i; |
|
37 |
break; |
|
38 |
} |
|
34 | 39 |
|
35 |
var warehouse = warehouses[warehouse_index];
|
|
36 |
var bin_index = 0;
|
|
40 |
var warehouse = warehouses[warehouse_index]; |
|
41 |
var bin_index = 0; |
|
37 | 42 |
|
38 |
for (i = 0; i < warehouse['bins'].length; i++)
|
|
39 |
if (warehouse['bins'][i]['id'] == bin_id) {
|
|
40 |
bin_index = i;
|
|
41 |
break;
|
|
42 |
}
|
|
43 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
44 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
45 |
bin_index = i; |
|
46 |
break; |
|
47 |
} |
|
43 | 48 |
|
44 |
for (i = 0; i < warehouse['bins'].length; i++) {
|
|
45 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
|
|
46 |
}
|
|
49 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
50 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
51 |
} |
|
47 | 52 |
|
48 | 53 |
|
49 |
control.options[bin_index].selected = true;
|
|
50 |
}
|
|
54 |
control.options[bin_index].selected = true; |
|
55 |
} |
|
51 | 56 |
|
52 |
$(function() { |
|
53 |
warehouse_selected([% warehouse_id %], [% bin_id %]); |
|
54 |
}) |
|
55 |
--> |
|
56 |
</script> |
|
57 |
$(function() { |
|
58 |
warehouse_selected([% warehouse_id %], [% bin_id %]); |
|
59 |
}) |
|
60 |
--></script> |
|
57 | 61 |
|
58 |
<form name="Form" method="post" action="wh.pl" id="form"> |
|
62 |
<form name="Form" method="post" action="wh.pl" id="form"> |
|
63 |
<div class="wrapper"> |
|
59 | 64 |
|
60 |
[% IF saved_message %]
|
|
65 |
[% IF saved_message %] |
|
61 | 66 |
<p>[% saved_message %]</p> |
62 |
[% END %]
|
|
67 |
[% END %] |
|
63 | 68 |
|
64 |
<p> |
|
65 |
<table> |
|
66 |
<tr> |
|
67 |
<th align="right" nowrap>[% 'Assembly' | $T8 %]</th> |
|
68 |
<td> |
|
69 |
[% P.part.picker("parts_id", parts_id, part_type="assembly", class="initial_focus", fat_set_item="1") %] |
|
70 |
</td> |
|
71 |
</tr> |
|
72 | 69 |
|
70 |
<table class="tbl-horizontal"> |
|
71 |
<tbody> |
|
73 | 72 |
<tr> |
74 |
<th align="right" nowrap>[% 'Destination warehouse' | $T8 %]</th> |
|
75 |
<td> |
|
76 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)"> |
|
77 |
[%- FOREACH warehouse = WAREHOUSES %] |
|
78 |
<option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option> |
|
79 |
[%- END %] |
|
80 |
</select> |
|
81 |
</td> |
|
73 |
<th>[% 'Assembly' | $T8 %]</th> |
|
74 |
<td>[% P.part.picker("parts_id", parts_id, part_type="assembly", class="initial_focus", fat_set_item="1", class="wi-lightwide") %] </td> |
|
82 | 75 |
</tr> |
83 |
|
|
84 | 76 |
<tr> |
85 |
<th align="right" nowrap>[% 'Destination bin' | $T8 %]:</th> |
|
86 |
<td><select id="bin_id" name="bin_id"></select></td> |
|
77 |
<th>[% 'Destination warehouse' | $T8 %]</th> |
|
78 |
<td> |
|
79 |
<select name="warehouse_id" id="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)" class="wi-lightwide"> |
|
80 |
[% FOREACH warehouse = WAREHOUSES %] |
|
81 |
<option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option> |
|
82 |
[% END %] |
|
83 |
</select> |
|
84 |
</td> |
|
87 | 85 |
</tr> |
88 |
|
|
89 | 86 |
<tr> |
90 |
<th align="right" nowrap>[% 'Charge number' | $T8 %]</th>
|
|
91 |
<td><input name="chargenumber" size="30" value="[% HTML.escape(chargenumber) %]"></td>
|
|
87 |
<th>[% 'Destination bin' | $T8 %]</th>
|
|
88 |
<td><select id="bin_id" name="bin_id" class="wi-lightwide"></select></td>
|
|
92 | 89 |
</tr> |
93 |
|
|
94 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
95 | 90 |
<tr> |
96 |
<th align="right" nowrap>[% 'Best Before' | $T8 %]</th> |
Auch abrufbar als: Unified diff
Neues kivitendo Design Aenderungen in templates/webpages/wh/..