Revision b36f0864
Von Peter Schulgin vor mehr als 7 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
1331 | 1331 |
# so that they can be sorted in later |
1332 | 1332 |
my %prepared_template_arrays = IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form); |
1333 | 1333 |
my @prepared_arrays = keys %prepared_template_arrays; |
1334 |
my @separate_totals = qw(non_separate_subtotal); |
|
1335 | 1334 |
|
1336 | 1335 |
$form->{TEMPLATE_ARRAYS} = { }; |
1337 | 1336 |
|
... | ... | |
1438 | 1437 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} }, ($discount != 0) ? $discount * -1 : ''; |
1439 | 1438 |
push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"}; |
1440 | 1439 |
|
1441 |
if ( $prepared_template_arrays{separate}[$i - 1] ) { |
|
1442 |
my $pabbr = $prepared_template_arrays{separate}[$i - 1]; |
|
1443 |
if ( ! $form->{"separate_${pabbr}_subtotal"} ) { |
|
1444 |
push @separate_totals , "separate_${pabbr}_subtotal"; |
|
1445 |
$form->{"separate_${pabbr}_subtotal"} = 0; |
|
1446 |
} |
|
1447 |
$form->{"separate_${pabbr}_subtotal"} += $linetotal; |
|
1448 |
} else { |
|
1449 |
$form->{non_separate_subtotal} += $linetotal; |
|
1450 |
} |
|
1451 |
|
|
1452 | 1440 |
$form->{ordtotal} += $linetotal; |
1453 | 1441 |
$form->{nodiscount_total} += $nodiscount_linetotal; |
1454 | 1442 |
$form->{discount_total} += $discount; |
... | ... | |
1622 | 1610 |
$form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; |
1623 | 1611 |
|
1624 | 1612 |
$form->{order} = SL::DB::Manager::Order->find_by(id => $form->{id}) if $form->{id}; |
1625 |
$form->{$_} = $form->format_amount($myconfig, $form->{$_}, 2) for @separate_totals; |
|
1626 | 1613 |
|
1627 | 1614 |
$main::lxdebug->leave_sub(); |
1628 | 1615 |
} |
Auch abrufbar als: Unified diff
Revert "Artikel-Klassifizierung: Neue Option "Preis separat ausweisen""
This reverts commit 815c3639a21ed53b288fd8bbb231e741c8e67ce5.