Revision d3c92dc2
Von Bernd Bleßmann vor 7 Monaten hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
# No right to set or change prices, so delete prices from params.
|
||
delete $params->{$_} for qw(sellprice_as_number lastcost_as_number listprice_as_number);
|
||
|
||
# Todo: pricegroup prices, makemodel prices, customer prices?
|
||
# Todo: makemodel prices, customer prices?
|
||
}
|
||
|
||
delete $params->{id};
|
||
... | ... | |
$self->part->translations([]) unless $params{use_as_new};
|
||
$self->parse_form_translations;
|
||
|
||
$self->part->prices([]);
|
||
$self->parse_form_prices;
|
||
if ($::auth->assert('part_service_assembly_edit_prices', 'may_fail')) {
|
||
$self->part->prices([]);
|
||
$self->parse_form_prices;
|
||
}
|
||
|
||
$self->parse_form_customerprices;
|
||
$self->parse_form_makemodels;
|
templates/design40_webpages/part/_pricegroup_prices.html | ||
---|---|---|
[% L.hidden_tag('prices[].price_id', price.id) # id not used? %]
|
||
[% L.hidden_tag('prices[].pricegroup', pricegroup.pricegroup) %][% HTML.escape(pricegroup.pricegroup) %]
|
||
</th>
|
||
<td> [% L.input_tag('prices[].price', price.price_as_number, size=11, class='wi-mediumsmall numeric reformat_number') %] </td>
|
||
<td>
|
||
[% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
|
||
[% L.input_tag('prices[].price', price.price_as_number, size=11, class='wi-mediumsmall numeric reformat_number') %]
|
||
[% ELSE %]
|
||
<span class="data wi-mediumsmall numeric">[% price.price_as_number %]</span>
|
||
[% END %]
|
||
</td>
|
||
</tr>
|
||
[% END %]
|
||
[% # followed by Storage-Table %]
|
templates/webpages/part/_pricegroup_prices.html | ||
---|---|---|
<td style='display:none'>[% L.hidden_tag('prices[+].pricegroup_id', pricegroup.id) %]
|
||
[% L.hidden_tag('prices[].price_id', price.id) # id not used? %]</td>
|
||
<td width=50%>[% L.hidden_tag('prices[].pricegroup', pricegroup.pricegroup) %][% HTML.escape(pricegroup.pricegroup) %]</td>
|
||
<td width=50%>[% L.input_tag('prices[].price', price.price_as_number, size=11, class='numeric reformat_number') %]</td>
|
||
<td width=50%>
|
||
[% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
|
||
[% L.input_tag('prices[].price', price.price_as_number, size=11, class='numeric reformat_number') %]
|
||
[% ELSE %]
|
||
<span class="numeric">[% price.price_as_number %]</span>
|
||
[% END %]
|
||
</td>
|
||
</tr>
|
||
[%- END %]
|
||
</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.