Revision d2d78032
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
967 | 967 |
$self->js->show('#subtotal_row_id'); |
968 | 968 |
} |
969 | 969 |
|
970 |
if ($self->order->is_sales) { |
|
971 |
my $is_neg = $self->order->marge_total < 0; |
|
972 |
$self->js |
|
973 |
->html('#marge_total_id', $::form->format_amount(\%::myconfig, $self->order->marge_total, 2)) |
|
974 |
->html('#marge_percent_id', $::form->format_amount(\%::myconfig, $self->order->marge_percent, 2)) |
|
975 |
->action_if( $is_neg, 'addClass', '#marge_total_id', 'plus0') |
|
976 |
->action_if( $is_neg, 'addClass', '#marge_percent_id', 'plus0') |
|
977 |
->action_if( $is_neg, 'addClass', '#marge_percent_sign_id', 'plus0') |
|
978 |
->action_if(!$is_neg, 'removeClass', '#marge_total_id', 'plus0') |
|
979 |
->action_if(!$is_neg, 'removeClass', '#marge_percent_id', 'plus0') |
|
980 |
->action_if(!$is_neg, 'removeClass', '#marge_percent_sign_id', 'plus0'); |
|
981 |
} |
|
982 |
|
|
970 | 983 |
$self->js |
971 | 984 |
->html('#netamount_id', $::form->format_amount(\%::myconfig, $self->order->netamount, -2)) |
972 | 985 |
->html('#amount_id', $::form->format_amount(\%::myconfig, $self->order->amount, -2)) |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
291 | 291 |
</table> |
292 | 292 |
</td> |
293 | 293 |
|
294 |
[%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%] |
|
295 |
[%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%] |
|
296 |
<td> |
|
297 |
<table> |
|
298 |
<tr> |
|
299 |
<th align="left">[% 'Ertrag' | $T8 %]</th> |
|
300 |
<td align="right"> |
|
301 |
[%- L.div_tag(SELF.order.marge_total_as_number, id='marge_total_id', class=marge_class) %] |
|
302 |
</td> |
|
303 |
</tr> |
|
304 |
<tr> |
|
305 |
<th align="left">[% 'Ertrag prozentual' | $T8 %]</th> |
|
306 |
<td align="right"> |
|
307 |
[%- L.div_tag(LxERP.format_amount(SELF.order.marge_percent, 2), id='marge_percent_id', class=marge_class) %] |
|
308 |
</td> |
|
309 |
<td>[%- L.div_tag('%', id='marge_percent_sign_id', class=marge_class) %]</td> |
|
310 |
</tr> |
|
311 |
</table> |
|
312 |
</td> |
|
313 |
[%- END %] |
|
314 |
|
|
294 | 315 |
<td align="right"> |
295 | 316 |
<table> |
296 | 317 |
<tr id="taxincluded_row_id" [%- IF !SELF.taxes.size %]style="display:none"[%- END %]> |
Auch abrufbar als: Unified diff
Auftrags-Controller: totalen Ertrag unten anzeigen