Revision d3c92dc2
Von Bernd Bleßmann vor 3 Monaten hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
1043 | 1043 |
# No right to set or change prices, so delete prices from params. |
1044 | 1044 |
delete $params->{$_} for qw(sellprice_as_number lastcost_as_number listprice_as_number); |
1045 | 1045 |
|
1046 |
# Todo: pricegroup prices, makemodel prices, customer prices?
|
|
1046 |
# Todo: makemodel prices, customer prices? |
|
1047 | 1047 |
} |
1048 | 1048 |
|
1049 | 1049 |
delete $params->{id}; |
... | ... | |
1068 | 1068 |
$self->part->translations([]) unless $params{use_as_new}; |
1069 | 1069 |
$self->parse_form_translations; |
1070 | 1070 |
|
1071 |
$self->part->prices([]); |
|
1072 |
$self->parse_form_prices; |
|
1071 |
if ($::auth->assert('part_service_assembly_edit_prices', 'may_fail')) { |
|
1072 |
$self->part->prices([]); |
|
1073 |
$self->parse_form_prices; |
|
1074 |
} |
|
1073 | 1075 |
|
1074 | 1076 |
$self->parse_form_customerprices; |
1075 | 1077 |
$self->parse_form_makemodels; |
templates/design40_webpages/part/_pricegroup_prices.html | ||
---|---|---|
26 | 26 |
[% L.hidden_tag('prices[].price_id', price.id) # id not used? %] |
27 | 27 |
[% L.hidden_tag('prices[].pricegroup', pricegroup.pricegroup) %][% HTML.escape(pricegroup.pricegroup) %] |
28 | 28 |
</th> |
29 |
<td> [% L.input_tag('prices[].price', price.price_as_number, size=11, class='wi-mediumsmall numeric reformat_number') %] </td> |
|
29 |
<td> |
|
30 |
[% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %] |
|
31 |
[% L.input_tag('prices[].price', price.price_as_number, size=11, class='wi-mediumsmall numeric reformat_number') %] |
|
32 |
[% ELSE %] |
|
33 |
<span class="data wi-mediumsmall numeric">[% price.price_as_number %]</span> |
|
34 |
[% END %] |
|
35 |
</td> |
|
30 | 36 |
</tr> |
31 | 37 |
[% END %] |
32 | 38 |
[% # followed by Storage-Table %] |
templates/webpages/part/_pricegroup_prices.html | ||
---|---|---|
16 | 16 |
<td style='display:none'>[% L.hidden_tag('prices[+].pricegroup_id', pricegroup.id) %] |
17 | 17 |
[% L.hidden_tag('prices[].price_id', price.id) # id not used? %]</td> |
18 | 18 |
<td width=50%>[% L.hidden_tag('prices[].pricegroup', pricegroup.pricegroup) %][% HTML.escape(pricegroup.pricegroup) %]</td> |
19 |
<td width=50%>[% L.input_tag('prices[].price', price.price_as_number, size=11, class='numeric reformat_number') %]</td> |
|
19 |
<td width=50%> |
|
20 |
[% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %] |
|
21 |
[% L.input_tag('prices[].price', price.price_as_number, size=11, class='numeric reformat_number') %] |
|
22 |
[% ELSE %] |
|
23 |
<span class="numeric">[% price.price_as_number %]</span> |
|
24 |
[% END %] |
|
25 |
</td> |
|
20 | 26 |
</tr> |
21 | 27 |
[%- END %] |
22 | 28 |
</table> |
Auch abrufbar als: Unified diff
Artikelstamm: Preisgruppenpreise nicht ändern können, wenn kein Recht
Preisfelder in der Maske sind nicht editierbar und Preise werden nicht
aus der Form geholt. Preise vorhandener Objekte werdene nicht überschrieben.