Revision 1213b27a
Von Hans Peter Schlaepfer vor mehr als 5 Jahren hinzugefügt
templates/webpages/wh/journal_filter.html | ||
---|---|---|
6 | 6 |
|
7 | 7 |
<h1>[% 'Report about warehouse transactions' | $T8 %]</h1> |
8 | 8 |
|
9 |
<script type="text/javascript">
|
|
10 |
<!--
|
|
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) %][%- 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 %]
|
|
19 | 19 |
warehouses[[% WAREHOUSES_it.count %]] = new Array(); |
20 | 20 |
warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %]; |
21 | 21 |
warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array(); |
22 | 22 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array(); |
23 | 23 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---"; |
24 | 24 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = ""; |
25 |
[% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %] |
|
26 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array(); |
|
27 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
|
28 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %]; |
|
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 %]; |
|
29 | 30 |
[% END %] |
30 |
[% END %] |
|
31 |
|
|
32 |
function warehouse_selected(warehouse_id, bin_id) { |
|
33 |
var control = document.getElementById("bin_id"); |
|
31 |
[% END %] |
|
34 | 32 |
|
35 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
36 |
control.options[i] = null; |
|
37 |
} |
|
33 |
function warehouse_selected(warehouse_id, bin_id) { |
|
34 |
var control = document.getElementById("bin_id"); |
|
38 | 35 |
|
39 |
var warehouse_index = 0; |
|
36 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
37 |
control.options[i] = null; |
|
38 |
} |
|
40 | 39 |
|
41 |
for (i = 0; i < warehouses.length; i++) |
|
42 |
if (warehouses[i]['id'] == warehouse_id) { |
|
43 |
warehouse_index = i; |
|
44 |
break; |
|
45 |
} |
|
40 |
var warehouse_index = 0; |
|
46 | 41 |
|
47 |
var warehouse = warehouses[warehouse_index]; |
|
48 |
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 |
} |
|
49 | 47 |
|
50 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
51 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
52 |
bin_index = i; |
|
53 |
break; |
|
54 |
} |
|
48 |
var warehouse = warehouses[warehouse_index]; |
|
49 |
var bin_index = 0; |
|
55 | 50 |
|
56 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
57 |
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; |
|
58 | 55 |
} |
59 | 56 |
|
60 |
|
|
61 |
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']);
|
|
62 | 59 |
} |
63 | 60 |
|
64 |
$(function() { |
|
65 |
warehouse_selected(0, 0); |
|
66 |
document.Form.partnumber.focus(); |
|
67 |
}) |
|
68 |
--> |
|
69 |
</script> |
|
70 | 61 |
|
71 |
<form method="post" name="Form" action="wh.pl" id="form"> |
|
62 |
control.options[bin_index].selected = true; |
|
63 |
} |
|
72 | 64 |
|
73 |
<table> |
|
74 |
<tr> |
|
75 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th> |
|
76 |
</tr> |
|
65 |
$(function() { |
|
66 |
warehouse_selected(0, 0); |
|
67 |
document.Form.partnumber.focus(); |
|
68 |
}) |
|
69 |
--></script> |
|
70 |
|
|
71 |
<form method="post" name="Form" action="wh.pl" id="form"> |
|
72 |
<div class="wrapper"> |
|
77 | 73 |
|
78 | 74 |
<tr> |
79 | 75 |
<td> |
... | ... | |
153 | 149 |
<tr> |
154 | 150 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th> |
155 | 151 |
</tr> |
156 |
|
|
157 | 152 |
<tr> |
158 | 153 |
<td> |
159 | 154 |
<table> |
templates/webpages/wh/removal_parts_selection.html | ||
---|---|---|
20 | 20 |
</select> |
21 | 21 |
</td> |
22 | 22 |
</tr> |
23 |
|
|
24 | 23 |
<tr> |
25 | 24 |
<td>[% 'Optional comment' | $T8 %]:</td> |
26 |
<td><input name="comment" size="60"></td> |
|
25 |
<td><input type="text" name="comment" size="60"></td>
|
|
27 | 26 |
</tr> |
28 | 27 |
</table> |
29 | 28 |
</p> |
... | ... | |
42 | 41 |
<th class="listheading">[% 'Available qty' | $T8 %]</th> |
43 | 42 |
<th class="listheading">[% 'Removal qty' | $T8 %]</th> |
44 | 43 |
</tr> |
45 |
|
|
46 | 44 |
[% FOREACH row = CONTENTS %] |
47 | 45 |
<tr class="listrow[% loop.count % 2 %]"> |
48 | 46 |
<input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]"> |
templates/webpages/wh/report_filter.html | ||
---|---|---|
6 | 6 |
|
7 | 7 |
<h1>[% 'Report about warehouse contents' | $T8 %]</h1> |
8 | 8 |
|
9 |
<script type="text/javascript"> |
|
10 |
<!-- |
|
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) %][%- FOREACH warehouse = WAREHOUSES_it %] |
|
19 |
warehouses[[% WAREHOUSES_it.count %]] = new Array(); |
|
20 |
warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %]; |
|
21 |
warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array(); |
|
22 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array(); |
|
23 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---"; |
|
24 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = ""; |
|
25 |
[% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_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 %] |
|
19 |
warehouses[[% WAREHOUSES_it.count %]] = new Array(); |
|
20 |
warehouses[[% WAREHOUSES_it.count %]]['id'] = [% warehouse.id %]; |
|
21 |
warehouses[[% WAREHOUSES_it.count %]]['bins'] = new Array(); |
|
22 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0] = new Array(); |
|
23 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['description'] = "---"; |
|
24 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][0]['id'] = ""; |
|
25 |
[% USE BINS_it = Iterator(warehouse.BINS) %] |
|
26 |
[% FOREACH bin = BINS_it %] |
|
26 | 27 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]] = new Array(); |
27 | 28 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
28 | 29 |
warehouses[[% WAREHOUSES_it.count %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %]; |
29 |
[% END %]
|
|
30 |
[% END %]
|
|
30 |
[% END %] |
|
31 |
[% END %] |
|
31 | 32 |
|
32 |
function warehouse_selected(warehouse_id, bin_id) {
|
|
33 |
var control = document.getElementById("bin_id");
|
|
33 |
function warehouse_selected(warehouse_id, bin_id) { |
|
34 |
var control = document.getElementById("bin_id"); |
|
34 | 35 |
|
35 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
36 |
control.options[i] = null;
|
|
37 |
}
|
|
36 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
37 |
control.options[i] = null; |
|
38 |
} |
|
38 | 39 |
|
39 |
var warehouse_index = 0;
|
|
40 |
var warehouse_index = 0; |
|
40 | 41 |
|
41 |
for (i = 0; i < warehouses.length; i++)
|
|
42 |
if (warehouses[i]['id'] == warehouse_id) {
|
|
43 |
warehouse_index = i;
|
|
44 |
break;
|
|
45 |
}
|
|
42 |
for (i = 0; i < warehouses.length; i++) |
|
43 |
if (warehouses[i]['id'] == warehouse_id) { |
|
44 |
warehouse_index = i; |
|
45 |
break; |
|
46 |
} |
|
46 | 47 |
|
47 |
var warehouse = warehouses[warehouse_index];
|
|
48 |
var bin_index = 0;
|
|
48 |
var warehouse = warehouses[warehouse_index]; |
|
49 |
var bin_index = 0; |
|
49 | 50 |
|
50 |
for (i = 0; i < warehouse['bins'].length; i++)
|
|
51 |
if (warehouse['bins'][i]['id'] == bin_id) {
|
|
52 |
bin_index = i;
|
|
53 |
break;
|
|
54 |
}
|
|
51 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
52 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
53 |
bin_index = i; |
|
54 |
break; |
|
55 |
} |
|
55 | 56 |
|
56 |
for (i = 0; i < warehouse['bins'].length; i++) {
|
|
57 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
|
|
58 |
}
|
|
57 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
58 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
59 |
} |
|
59 | 60 |
|
60 | 61 |
|
61 |
control.options[bin_index].selected = true;
|
|
62 |
}
|
|
62 |
control.options[bin_index].selected = true; |
|
63 |
} |
|
63 | 64 |
|
64 |
$(function () { |
|
65 |
warehouse_selected(0, 0); |
|
66 |
document.Form.partnumber.focus(); |
|
67 |
}); |
|
68 |
--> |
|
69 |
</script> |
|
65 |
$(function () { |
|
66 |
warehouse_selected(0, 0); |
|
67 |
document.Form.partnumber.focus(); |
|
68 |
}); |
|
70 | 69 |
|
71 |
<form method="post" name="Form" action="wh.pl" id="form">
|
|
70 |
--></script>
|
|
72 | 71 |
|
73 | 72 |
<input type="hidden" name="nextsub" value="generate_report"> |
74 | 73 |
|
... | ... | |
76 | 75 |
<tr> |
77 | 76 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Filter' | $T8 %]</th> |
78 | 77 |
</tr> |
79 |
|
|
80 | 78 |
<tr> |
81 | 79 |
<td> |
82 | 80 |
<table> |
... | ... | |
147 | 145 |
<tr> |
148 | 146 |
<th class="listheading" align="left" valign="top" colspan="6" nowrap>[% 'Include in Report' | $T8 %]</th> |
149 | 147 |
</tr> |
150 |
|
|
151 | 148 |
<tr> |
152 | 149 |
<td> |
153 | 150 |
<input name="l_partdescription" type="hidden" value="Y"> |
templates/webpages/wh/transfer_parts_selection.html | ||
---|---|---|
4 | 4 |
|
5 | 5 |
<h1>[% title %]</h1> |
6 | 6 |
|
7 |
<script type="text/javascript"> |
|
8 |
<!-- |
|
9 |
warehouses = new Array(); |
|
10 |
[% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %] |
|
11 |
warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array(); |
|
12 |
[% 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) %]"]; |
|
13 |
[% END %] |
|
14 |
[% 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 %] |
|
15 | 17 |
|
16 |
function warehouse_selected(row, index) {
|
|
17 |
var cname = "dst_bin_id_" + row;
|
|
18 |
var control = document.getElementById(cname);
|
|
18 |
function warehouse_selected(row, index) { |
|
19 |
var cname = "dst_bin_id_" + row; |
|
20 |
var control = document.getElementById(cname); |
|
19 | 21 |
|
20 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
21 |
control.options[i] = null;
|
|
22 |
}
|
|
22 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
23 |
control.options[i] = null; |
|
24 |
} |
|
23 | 25 |
|
24 |
for (i = 0; i < warehouses[index].length; i++) {
|
|
25 |
control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
|
|
26 |
}
|
|
26 |
for (i = 0; i < warehouses[index].length; i++) { |
|
27 |
control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]); |
|
28 |
} |
|
27 | 29 |
|
28 |
control.options[0].selected = true;
|
|
29 |
}
|
|
30 |
control.options[0].selected = true; |
|
31 |
} |
|
30 | 32 |
|
31 |
$(function() { |
|
32 |
[% FOREACH row = CONTENTS %] |
|
33 |
warehouse_selected([% loop.count %], [% initial_warehouse_idx %]); |
|
34 |
[% END %] |
|
35 |
}); |
|
36 |
--> |
|
37 |
</script> |
|
33 |
$(function() { |
|
34 |
[% FOREACH row = CONTENTS %] |
|
35 |
warehouse_selected([% loop.count %], [% initial_warehouse_idx %]); |
|
36 |
[% END %] |
|
37 |
}); |
|
38 |
--></script> |
|
38 | 39 |
|
39 |
<form method="post" action="wh.pl" id="form">
|
|
40 |
<form method="post" action="wh.pl" id="form"> |
|
40 | 41 |
|
41 |
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
|
|
42 |
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]"> |
|
42 | 43 |
|
43 |
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
|
|
44 |
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p> |
|
44 | 45 |
|
45 | 46 |
<p> |
46 | 47 |
<table> |
47 | 48 |
<tr> |
48 |
<td>[% 'Select type of transfer' | $T8 %]:</td> |
|
49 |
<td> |
|
50 |
<select name="transfer_type_id"> |
|
51 |
[%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %] |
|
52 |
</select> |
|
53 |
</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> |
|
54 | 57 |
</tr> |
55 |
|
|
56 | 58 |
<tr> |
57 |
<td>[% 'Optional comment' | $T8 %]:</td>
|
|
58 |
<td><input name="comment" size="20"></td>
|
|
59 |
<th>[% 'Optional comment' | $T8 %]:</th>
|
|
60 |
<td><input type="text" name="comment" size="20"></td>
|
|
59 | 61 |
</tr> |
60 | 62 |
<tr> |
61 |
<td>[% 'Change default bin for this parts' | $T8 %]:</td>
|
|
62 |
<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>
|
|
63 | 65 |
</tr> |
64 |
</table>
|
|
65 |
</p>
|
|
66 |
</tbody>
|
|
67 |
</table>
|
|
66 | 68 |
|
67 | 69 |
<p> |
68 | 70 |
<table> |
... | ... | |
81 | 83 |
</tr> |
82 | 84 |
|
83 | 85 |
[% FOREACH row = CONTENTS %] |
84 |
<tr class="listrow[% loop.count % 2 %]"> |
|
85 |
<input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]"> |
|
86 |
<input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]"> |
|
87 |
<input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]"> |
|
88 |
<input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]"> |
|
89 |
<input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"> |
|
90 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
91 |
<input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]"> |
|
92 |
[% END %] |
|
93 |
<input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]"> |
|
94 |
<td>[% HTML.escape(row.bindescription) %]</td> |
|
95 |
<td>[% HTML.escape(row.partnumber) %]</td> |
|
96 |
<td>[% HTML.escape(row.partdescription) %]</td> |
|
97 |
<td>[% HTML.escape(row.chargenumber) %]</td> |
|
98 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
99 |
<td>[% HTML.escape(row.bestbefore) %]</td> |
|
100 |
[% END %] |
|
101 |
<td>[% HTML.escape(row.ean) %]</td> |
|
102 |
<td>[% HTML.escape(row.qty) %]</td> |
|
103 |
<td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td> |
|
104 |
<td> |
|
105 |
<select name="unit_[% loop.count %]"> |
|
106 |
[% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %] |
|
107 |
</select> |
|
108 |
</td> |
|
109 |
|
|
110 |
<td> |
|
111 |
<select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)"> |
|
112 |
[% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %] |
|
113 |
</select> |
|
114 |
</td> |
|
115 |
<td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td> |
|
116 |
</tr> |
|
117 |
|
|
86 |
<tr> |
|
87 |
<td> |
|
88 |
<input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]"> |
|
89 |
<input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]"> |
|
90 |
<input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]"> |
|
91 |
<input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]"> |
|
92 |
<input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"> |
|
93 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
94 |
<input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]"> |
|
95 |
[% END %] |
|
96 |
<input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]"> |
|
97 |
[% HTML.escape(row.bindescription) %] |
|
98 |
</td> |
|
99 |
<td>[% HTML.escape(row.partnumber) %]</td> |
|
100 |
<td>[% HTML.escape(row.partdescription) %]</td> |
|
101 |
<td>[% HTML.escape(row.chargenumber) %]</td> |
|
102 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
103 |
<td>[% HTML.escape(row.bestbefore) %]</td> |
|
104 |
[% END %] |
|
105 |
<td>[% HTML.escape(row.ean) %]</td> |
|
106 |
<td>[% HTML.escape(row.qty) %]</td> |
|
107 |
<td><input type="text" name="qty_[% loop.count %]" size="8" style="text-align: right"></td> |
|
108 |
<td> |
|
109 |
<select name="unit_[% loop.count %]"> |
|
110 |
[% FOREACH unit = row.UNITS %] |
|
111 |
<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option> |
|
112 |
[% END %] |
|
113 |
</select> |
|
114 |
</td> |
|
115 |
<td> |
|
116 |
<select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)"> |
|
117 |
[% FOREACH wh = WAREHOUSES %] |
|
118 |
<option value="[% HTML.escape(wh.id) %]" [% if wh.selected %] selected[% end %]>[% HTML.escape(wh.description) %]</option> |
|
119 |
[% END %] |
|
120 |
</select> |
|
121 |
</td> |
|
122 |
<td> |
|
123 |
<select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select> |
|
124 |
</td> |
|
125 |
</tr> |
|
118 | 126 |
[% END %] |
119 | 127 |
|
120 |
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
|
|
128 |
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]"> |
|
121 | 129 |
|
122 |
</table> |
|
123 |
</p> |
|
124 |
</form> |
|
130 |
</form> |
templates/webpages/wh/warehouse_selection.html | ||
---|---|---|
6 | 6 |
|
7 | 7 |
<h1>[% title %]</h1> |
8 | 8 |
|
9 |
<script type="text/javascript"> |
|
10 |
<!-- |
|
11 |
warehouses = new Array(); |
|
12 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- 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) %][% 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 %] |
|
20 | 21 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]] = new Array(); |
21 | 22 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
22 | 23 |
warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %]; |
23 |
[% END %]
|
|
24 |
[% END %]
|
|
24 |
[% END %] |
|
25 |
[% END %] |
|
25 | 26 |
|
26 |
function warehouse_selected(warehouse_id, bin_id) {
|
|
27 |
var control = document.getElementById("bin_id");
|
|
27 |
function warehouse_selected(warehouse_id, bin_id) { |
|
28 |
var control = document.getElementById("bin_id"); |
|
28 | 29 |
|
29 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
30 |
control.options[i] = null;
|
|
31 |
}
|
|
30 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
31 |
control.options[i] = null; |
|
32 |
} |
|
32 | 33 |
|
33 |
var warehouse_index = 0;
|
|
34 |
var warehouse_index = 0; |
|
34 | 35 |
|
35 |
for (i = 0; i < warehouses.length; i++)
|
|
36 |
if (warehouses[i]['id'] == warehouse_id) {
|
|
37 |
warehouse_index = i;
|
|
38 |
break;
|
|
39 |
}
|
|
36 |
for (i = 0; i < warehouses.length; i++) |
|
37 |
if (warehouses[i]['id'] == warehouse_id) { |
|
38 |
warehouse_index = i; |
|
39 |
break; |
|
40 |
} |
|
40 | 41 |
|
41 |
var warehouse = warehouses[warehouse_index];
|
|
42 |
var bin_index = 0;
|
|
42 |
var warehouse = warehouses[warehouse_index]; |
|
43 |
var bin_index = 0; |
|
43 | 44 |
|
44 |
for (i = 0; i < warehouse['bins'].length; i++)
|
|
45 |
if (warehouse['bins'][i]['id'] == bin_id) {
|
|
46 |
bin_index = i;
|
|
47 |
break;
|
|
48 |
}
|
|
45 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
46 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
47 |
bin_index = i; |
|
48 |
break; |
|
49 |
} |
|
49 | 50 |
|
50 |
for (i = 0; i < warehouse['bins'].length; i++) {
|
|
51 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
|
|
52 |
}
|
|
51 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
52 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
53 |
} |
|
53 | 54 |
|
54 | 55 |
|
55 |
control.options[bin_index].selected = true;
|
|
56 |
}
|
|
56 |
control.options[bin_index].selected = true; |
|
57 |
} |
|
57 | 58 |
|
58 |
$(function() { |
|
59 |
warehouse_selected(0, 0); |
|
60 |
document.Form.partnumber.focus(); |
|
61 |
}); |
|
62 |
--> |
|
63 |
</script> |
|
59 |
$(function() { |
|
60 |
warehouse_selected(0, 0); |
|
61 |
document.Form.partnumber.focus(); |
|
62 |
}); |
|
63 |
--></script> |
|
64 | 64 |
|
65 | 65 |
<form name="Form" method="post" action="wh.pl" id="form"> |
66 | 66 |
|
67 |
[% IF saved_message %]
|
|
67 |
[% IF saved_message %] |
|
68 | 68 |
<p>[% saved_message %]</p> |
69 |
[% END %]
|
|
69 |
[% END %] |
|
70 | 70 |
|
71 |
<p> |
|
72 |
[% '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 %] |
|
73 |
</p> |
|
71 |
<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> |
|
74 | 72 |
|
75 | 73 |
<p> |
76 | 74 |
<table> |
... | ... | |
84 | 82 |
</select> |
85 | 83 |
</td> |
86 | 84 |
</tr> |
87 |
|
|
88 | 85 |
<tr> |
89 | 86 |
<th align="right" nowrap>[% 'Bin' | $T8 %]:</th> |
90 | 87 |
<td><select id="bin_id" name="bin_id"></select></td> |
91 | 88 |
</tr> |
92 |
|
|
93 | 89 |
<tr> |
94 | 90 |
<th align="right" nowrap>[% 'Limit part selection' | $T8 %]:</th> |
95 | 91 |
<td></td> |
96 | 92 |
</tr> |
97 |
|
|
98 | 93 |
<tr> |
99 | 94 |
<th align="right" nowrap>[% 'Part' | $T8 %]</th> |
100 | 95 |
<td> |
101 | 96 |
[% P.part.picker("part_id", '', size="30", part_type="part,assembly") %] |
102 | 97 |
</td> |
103 | 98 |
</tr> |
104 |
|
|
105 | 99 |
<tr> |
106 | 100 |
<th align="right" nowrap>[% 'Charge number' | $T8 %]</th> |
107 | 101 |
<td><input name="chargenumber" size="30"></td> |
108 | 102 |
</tr> |
109 |
|
|
110 | 103 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
111 | 104 |
<tr> |
112 | 105 |
<th align="right" nowrap>[% 'Best Before' | $T8 %]</th> |
... | ... | |
115 | 108 |
</td> |
116 | 109 |
</tr> |
117 | 110 |
[% END %] |
118 |
|
|
119 | 111 |
<tr> |
120 | 112 |
<th align="right" nowrap>[% 'EAN' | $T8 %]</th> |
121 | 113 |
<td><input name="ean" size="30"></td> |
122 | 114 |
</tr> |
123 |
</table> |
|
124 |
</p> |
|
125 |
</form> |
|
115 |
</tbody> |
|
116 |
</table> |
|
117 |
|
|
118 |
</form> |
templates/webpages/wh/warehouse_selection_assembly.html | ||
---|---|---|
7 | 7 |
|
8 | 8 |
<h1>[% title %]</h1> |
9 | 9 |
|
10 |
<script type="text/javascript"> |
|
11 |
<!-- |
|
12 |
warehouses = new Array(); |
|
13 |
[%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- 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) %][% 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 %] |
|
18 | 19 |
warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]] = new Array(); |
19 | 20 |
warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['description'] = "[% JavaScript.escape(bin.description) %]"; |
20 | 21 |
warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['id'] = [% bin.id %]; |
21 |
[% END %]
|
|
22 |
[% END %]
|
|
22 |
[% END %] |
|
23 |
[% END %] |
|
23 | 24 |
|
24 |
function warehouse_selected(warehouse_id, bin_id) {
|
|
25 |
var control = document.getElementById("bin_id");
|
|
25 |
function warehouse_selected(warehouse_id, bin_id) { |
|
26 |
var control = document.getElementById("bin_id"); |
|
26 | 27 |
|
27 |
for (var i = control.options.length - 1; i >= 0; i--) {
|
|
28 |
control.options[i] = null;
|
|
29 |
}
|
|
28 |
for (var i = control.options.length - 1; i >= 0; i--) { |
|
29 |
control.options[i] = null; |
|
30 |
} |
|
30 | 31 |
|
31 |
var warehouse_index = 0;
|
|
32 |
var warehouse_index = 0; |
|
32 | 33 |
|
33 |
for (i = 0; i < warehouses.length; i++)
|
|
34 |
if (warehouses[i]['id'] == warehouse_id) {
|
|
35 |
warehouse_index = i;
|
|
36 |
break;
|
|
37 |
}
|
|
34 |
for (i = 0; i < warehouses.length; i++) |
|
35 |
if (warehouses[i]['id'] == warehouse_id) { |
|
36 |
warehouse_index = i; |
|
37 |
break; |
|
38 |
} |
|
38 | 39 |
|
39 |
var warehouse = warehouses[warehouse_index];
|
|
40 |
var bin_index = 0;
|
|
40 |
var warehouse = warehouses[warehouse_index]; |
|
41 |
var bin_index = 0; |
|
41 | 42 |
|
42 |
for (i = 0; i < warehouse['bins'].length; i++)
|
|
43 |
if (warehouse['bins'][i]['id'] == bin_id) {
|
|
44 |
bin_index = i;
|
|
45 |
break;
|
|
46 |
}
|
|
43 |
for (i = 0; i < warehouse['bins'].length; i++) |
|
44 |
if (warehouse['bins'][i]['id'] == bin_id) { |
|
45 |
bin_index = i; |
|
46 |
break; |
|
47 |
} |
|
47 | 48 |
|
48 |
for (i = 0; i < warehouse['bins'].length; i++) {
|
|
49 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
|
|
50 |
}
|
|
49 |
for (i = 0; i < warehouse['bins'].length; i++) { |
|
50 |
control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']); |
|
51 |
} |
|
51 | 52 |
|
52 | 53 |
|
53 |
control.options[bin_index].selected = true;
|
|
54 |
}
|
|
54 |
control.options[bin_index].selected = true; |
|
55 |
} |
|
55 | 56 |
|
56 |
$(function() { |
|
57 |
warehouse_selected([% warehouse_id %], [% bin_id %]); |
|
58 |
}) |
|
59 |
--> |
|
60 |
</script> |
|
57 |
$(function() { |
|
58 |
warehouse_selected([% warehouse_id %], [% bin_id %]); |
|
59 |
}) |
|
60 |
--></script> |
|
61 | 61 |
|
62 | 62 |
<form name="Form" method="post" action="wh.pl" id="form"> |
63 | 63 |
|
64 |
[% IF saved_message %]
|
|
64 |
[% IF saved_message %] |
|
65 | 65 |
<p>[% saved_message %]</p> |
66 |
[% END %]
|
|
66 |
[% END %] |
|
67 | 67 |
|
68 | 68 |
<p> |
69 | 69 |
<table> |
... | ... | |
84 | 84 |
</select> |
85 | 85 |
</td> |
86 | 86 |
</tr> |
87 |
|
|
88 | 87 |
<tr> |
89 | 88 |
<th align="right" nowrap>[% 'Destination bin' | $T8 %]:</th> |
90 | 89 |
<td><select id="bin_id" name="bin_id"></select></td> |
91 | 90 |
</tr> |
92 |
|
|
93 | 91 |
<tr> |
94 | 92 |
<th align="right" nowrap>[% 'Charge number' | $T8 %]</th> |
95 | 93 |
<td><input name="chargenumber" size="30" value="[% HTML.escape(chargenumber) %]"></td> |
... | ... | |
103 | 101 |
</td> |
104 | 102 |
</tr> |
105 | 103 |
[% END %] |
106 |
|
|
107 | 104 |
<tr> |
108 | 105 |
<th align="right" nowrap>[% 'Quantity' | $T8 %]</th> |
109 | 106 |
<td> |
... | ... | |
113 | 110 |
</select> |
114 | 111 |
</td> |
115 | 112 |
</tr> |
116 |
|
|
117 | 113 |
<tr> |
118 | 114 |
<th align="right" nowrap>[% 'Optional comment' | $T8 %]</th> |
119 | 115 |
<td><input name="comment" size="30" value="[% HTML.escape(comment) %]"></td> |
120 | 116 |
</tr> |
117 |
</tbody> |
|
118 |
</table> |
|
121 | 119 |
|
122 |
</table> |
|
123 |
</p> |
|
124 |
</form> |
|
120 |
</div> |
|
121 |
</form> |
|
125 | 122 |
|
126 | 123 |
<script type='text/javascript'> |
127 |
$(function(){ |
|
128 |
$('#parts_id').on('set_item:PartPicker', function(event, item) { |
|
129 |
if (!item.warehouse_id) |
|
130 |
return; |
|
131 |
|
|
132 |
$('#warehouse_id').val(item.warehouse_id); |
|
133 |
warehouse_selected(item.warehouse_id, item.bin_id); |
|
134 |
}); |
|
135 |
}) |
|
124 |
$(function(){
|
|
125 |
$('#parts_id').on('set_item:PartPicker', function(event, item) {
|
|
126 |
if (!item.warehouse_id)
|
|
127 |
return;
|
|
128 |
|
|
129 |
$('#warehouse_id').val(item.warehouse_id);
|
|
130 |
warehouse_selected(item.warehouse_id, item.bin_id);
|
|
131 |
});
|
|
132 |
})
|
|
136 | 133 |
</script> |
Auch abrufbar als: Unified diff
Design-4.0: Kosmetik: templates/webpages/wh/..: Einrückung/HTML
Neues kivitendo Design Aenderungen in templates/webpages/wh/..