Revision fe7c0e24
Von Bernd Bleßmann vor 3 Monaten hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
1040 | 1040 |
# No right to set or change prices, so delete prices from params. |
1041 | 1041 |
delete $params->{$_} for qw(sellprice_as_number lastcost_as_number listprice_as_number); |
1042 | 1042 |
|
1043 |
# Todo: pricegroup prices, makemodel prices, customer prices?
|
|
1043 |
# Todo: makemodel prices, customer prices? |
|
1044 | 1044 |
} |
1045 | 1045 |
|
1046 | 1046 |
delete $params->{id}; |
... | ... | |
1065 | 1065 |
$self->part->translations([]) unless $params{use_as_new}; |
1066 | 1066 |
$self->parse_form_translations; |
1067 | 1067 |
|
1068 |
$self->part->prices([]); |
|
1069 |
$self->parse_form_prices; |
|
1068 |
if ($::auth->assert('part_service_assembly_edit_prices', 'may_fail')) { |
|
1069 |
$self->part->prices([]); |
|
1070 |
$self->parse_form_prices; |
|
1071 |
} |
|
1070 | 1072 |
|
1071 | 1073 |
$self->parse_form_customerprices; |
1072 | 1074 |
$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.