Revision ded22725
Von Hans Peter Schlaepfer vor etwa 5 Jahren hinzugefügt
templates/webpages/inventory/warehouse_selection_stock.html | ||
---|---|---|
1 |
[%- USE T8 %]
|
|
2 |
[%- USE L %]
|
|
3 |
[%- USE P %]
|
|
4 |
[%- USE HTML %]
|
|
5 |
[%- USE LxERP %]
|
|
1 |
[% USE T8 %] |
|
2 |
[% USE L %] |
|
3 |
[% USE P %] |
|
4 |
[% USE HTML %] |
|
5 |
[% USE LxERP %] |
|
6 | 6 |
|
7 | 7 |
<h1>[% title | html %]</h1> |
8 | 8 |
|
9 |
[%- INCLUDE 'common/flash.html' %]
|
|
9 |
[% INCLUDE 'common/flash.html' %] |
|
10 | 10 |
|
11 | 11 |
<form name="Form" method="post" action="controller.pl" id="form"> |
12 | 12 |
|
13 |
<table> |
|
14 |
<tr> |
|
15 |
<th align="right" nowrap>[% 'Part' | $T8 %]</th> |
|
16 |
<td>[% P.part.picker('part_id', SELF.part) %]</td> |
|
17 |
</tr> |
|
13 |
<div class="wrapper"> |
|
18 | 14 |
|
19 |
<tr> |
|
20 |
<th align="right" nowrap>[% 'Destination warehouse' | $T8 %]</th> |
|
21 |
<td>[% L.select_tag('warehouse_id', SELF.warehouses, default=SELF.warehouse.id, title_key='description') %] |
|
22 |
[% IF SELF.warehouse.id %] |
|
23 |
[% L.select_tag('bin_id', SELF.warehouse.bins, default=SELF.bin.id, title_key='description') %] |
|
24 |
[%- ELSE %] |
|
25 |
<span id='bin_id'></span> |
|
15 |
<table class="tbl-horizontal"> |
|
16 |
<colgroup> <col class="wi-mediumsmall"><col class="wi-verywide"> </colgroup> |
|
17 |
<tbody> |
|
18 |
<tr> |
|
19 |
<th>[% 'Part' | $T8 %]</th> |
|
20 |
<td>[% P.part.picker('part_id', SELF.part, class='wi-wide') %]</td> |
|
21 |
</tr> |
|
22 |
<tr> |
|
23 |
<th>[% 'Destination warehouse' | $T8 %]</th> |
|
24 |
<td class="wi-wide below"> |
|
25 |
[% L.select_tag('warehouse_id', SELF.warehouses, default=SELF.warehouse.id, title_key='description', class='wi-wide') %] |
|
26 |
[% IF SELF.warehouse.id %] |
|
27 |
[% L.select_tag('bin_id', SELF.warehouse.bins, default=SELF.bin.id, title_key='description', class='wi-wide below') %] |
|
28 |
[% ELSE %] |
|
29 |
<span id="bin_id" class="data wi-wide"></span> |
|
30 |
[% END %] |
|
31 |
<span id="write_default_bin_span" style="display:none;" class="below">[% L.checkbox_tag('write_default_bin', label=LxERP.t8('Write bin to default bin in part?')) %]</span> |
|
32 |
</td> |
|
33 |
</tr> |
|
34 |
<tr> |
|
35 |
<th>[% 'Charge number' | $T8 %]</th> |
|
36 |
<td>[% L.input_tag('chargenumber', FORM.chargenumber, class='wi-wide') %]</td> |
|
37 |
</tr> |
|
38 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
39 |
<tr> |
|
40 |
<th>[% 'Best Before' | $T8 %]</th> |
|
41 |
<td>[% L.date_tag('bestbefore', FORM.bestbefore) %]</td> |
|
42 |
</tr> |
|
26 | 43 |
[% END %] |
27 |
<span id='write_default_bin_span' style='display:none'><br>[% L.checkbox_tag('write_default_bin', label=LxERP.t8('Write bin to default bin in part?')) %]</span> |
|
28 |
</td> |
|
29 |
</tr> |
|
44 |
<tr> |
|
45 |
<th>[% 'Quantity' | $T8 %]</th> |
|
46 |
<td> |
|
47 |
[% L.input_tag('qty', LxERP.format_amount(FORM.qty), class='wi-verysmall') %] |
|
48 |
[% IF SELF.part.unit %] |
|
49 |
[% L.select_tag('unit_id', SELF.part.available_units, title_key='name', default=SELF.unit.id, class='wi-small') %] |
|
50 |
[% ELSE %] |
|
51 |
[% L.select_tag('unit_id', SELF.units, title_key='name', class='wi-small') %] |
|
52 |
[% END %] |
|
53 |
</td> |
|
54 |
</tr> |
|
55 |
<tr> |
|
56 |
<th>[% 'Select type of transfer in' | $T8 %]</th> |
|
57 |
<td>[% L.select_tag('transfer_type_id', TRANSFER_TYPES, title_key='description', class='wi-wide') %]</td> |
|
58 |
</tr> |
|
59 |
<tr> |
|
60 |
<th>[% 'Optional comment' | $T8 %]</th> |
|
61 |
<td>[% L.input_tag('comment', FORM.comment, class='wi-wide') %]</td> |
|
62 |
</tr> |
|
63 |
</tbody> |
|
64 |
</table> |
|
30 | 65 |
|
31 |
<tr> |
|
32 |
<th align="right" nowrap>[% 'Charge number' | $T8 %]</th> |
|
33 |
<td>[% L.input_tag('chargenumber', FORM.chargenumber, size=30) %]</td> |
|
34 |
</tr> |
|
66 |
</div><!-- /.wrapper --> |
|
35 | 67 |
|
36 |
[% IF INSTANCE_CONF.get_show_bestbefore %] |
|
37 |
<tr> |
|
38 |
<th align="right" nowrap>[% 'Best Before' | $T8 %]</th> |
|
39 |
<td>[% L.date_tag('bestbefore', FORM.bestbefore) %]</td> |
|
40 |
</tr> |
|
41 |
[%- END %] |
|
68 |
</form> |
|
42 | 69 |
|
43 |
<tr> |
|
44 |
<th align="right" nowrap>[% 'Quantity' | $T8 %]</th> |
|
45 |
<td> |
|
46 |
[% L.input_tag('qty', LxERP.format_amount(FORM.qty), size=10) %] |
|
47 |
[%- IF SELF.part.unit %] |
|
48 |
[% L.select_tag('unit_id', SELF.part.available_units, title_key='name', default=SELF.unit.id) %] |
|
49 |
[%- ELSE %] |
|
50 |
[% L.select_tag('unit_id', SELF.units, title_key='name') %] |
|
51 |
[%- END %] |
|
52 |
</td> |
|
53 |
</tr> |
|
70 |
<div class="wrapper"> |
|
54 | 71 |
|
55 |
<tr> |
|
56 |
<td>[% 'Select type of transfer in' | $T8 %]:</td> |
|
57 |
<td>[% L.select_tag('transfer_type_id', TRANSFER_TYPES, title_key='description') %] </td> |
|
58 |
</tr> |
|
72 |
<div id="stock"> |
|
73 |
[% PROCESS 'inventory/_stock.html' %] |
|
74 |
</div> |
|
75 |
<div id="journal"> |
|
76 |
[% PROCESS 'inventory/_journal.html' journal=SELF.mini_journal %] |
|
77 |
</div> |
|
59 | 78 |
|
60 |
<tr> |
|
61 |
<th align="right" nowrap>[% 'Optional comment' | $T8 %]</th> |
|
62 |
<td>[% L.input_tag('comment', FORM.comment, size=60) %]</td> |
|
63 |
</tr> |
|
64 |
</table> |
|
65 |
</form> |
|
79 |
</div><!-- /.wrapper --> |
|
66 | 80 |
|
67 |
<div id='stock'> |
|
68 |
[%- PROCESS 'inventory/_stock.html' %] |
|
69 |
</div> |
|
70 |
<div id='journal'> |
|
71 |
[%- PROCESS 'inventory/_journal.html' journal=SELF.mini_journal %] |
|
72 |
</div> |
|
73 | 81 |
|
74 |
<script type='text/javascript'>
|
|
75 |
function reload_warehouse_selection () { |
|
76 |
$.post("controller.pl", { action: 'Inventory/part_changed', part_id: function(){ return $('#part_id').val() } }, kivi.eval_json_result); |
|
77 |
$.post("controller.pl", { action: 'Inventory/mini_stock', part_id: function(){ return $('#part_id').val() } }, kivi.eval_json_result); |
|
78 |
} |
|
79 |
function reload_bin_selection () { |
|
80 |
$.post("controller.pl", { action: 'Inventory/warehouse_changed', warehouse_id: function(){ return $('#warehouse_id').val() } }, kivi.eval_json_result); |
|
81 |
} |
|
82 |
function check_part_selection_before_stocking() { |
|
83 |
if ($('#part_id').val() !== '') |
|
84 |
return true; |
|
82 |
<script type="text/javascript">
|
|
83 |
function reload_warehouse_selection () {
|
|
84 |
$.post("controller.pl", { action: 'Inventory/part_changed', part_id: function(){ return $('#part_id').val() } }, kivi.eval_json_result);
|
|
85 |
$.post("controller.pl", { action: 'Inventory/mini_stock', part_id: function(){ return $('#part_id').val() } }, kivi.eval_json_result);
|
|
86 |
}
|
|
87 |
function reload_bin_selection () {
|
|
88 |
$.post("controller.pl", { action: 'Inventory/warehouse_changed', warehouse_id: function(){ return $('#warehouse_id').val() } }, kivi.eval_json_result);
|
|
89 |
}
|
|
90 |
function check_part_selection_before_stocking() {
|
|
91 |
if ($('#part_id').val() !== '')
|
|
92 |
return true;
|
|
85 | 93 |
|
86 |
alert(kivi.t8('No article has been selected yet.')); |
|
87 |
return false; |
|
88 |
} |
|
89 |
$(function(){ |
|
90 |
$('#part_id').change(reload_warehouse_selection); |
|
91 |
$('#warehouse_id').change(reload_bin_selection); |
|
92 |
}) |
|
94 |
alert(kivi.t8('No article has been selected yet.'));
|
|
95 |
return false;
|
|
96 |
}
|
|
97 |
$(function(){
|
|
98 |
$('#part_id').change(reload_warehouse_selection);
|
|
99 |
$('#warehouse_id').change(reload_bin_selection);
|
|
100 |
})
|
|
93 | 101 |
</script> |
Auch abrufbar als: Unified diff
Neues kivitendo Design Aenderungen in templates/webpages/inventory/..