Revision 56a48a84
Von Sven Schöling vor fast 11 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
725 | 725 |
my @partsgroup = (); |
726 | 726 |
my $partsgroup; |
727 | 727 |
my $position = 0; |
728 |
my $subtotal_header = 0; |
|
729 |
my $subposition = 0; |
|
728 | 730 |
|
729 | 731 |
my (@project_ids, %projectnumbers, %projectdescriptions); |
730 | 732 |
|
... | ... | |
797 | 799 |
|
798 | 800 |
next if (!$form->{"id_$i"}); |
799 | 801 |
|
800 |
$position++; |
|
801 |
|
|
802 | 802 |
if ($item->[1] ne $sameitem) { |
803 | 803 |
push(@{ $form->{description} }, qq|$item->[1]|); |
804 | 804 |
$sameitem = $item->[1]; |
... | ... | |
809 | 809 |
$form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"}); |
810 | 810 |
|
811 | 811 |
# add number, description and qty to $form->{number}, .... |
812 |
if ($form->{"subtotal_$i"} && !$subtotal_header) { |
|
813 |
$subtotal_header = $i; |
|
814 |
$position = int($position); |
|
815 |
$subposition = 0; |
|
816 |
$position++; |
|
817 |
} elsif ($subtotal_header) { |
|
818 |
$subposition += 1; |
|
819 |
$position = int($position); |
|
820 |
$position = $position.".".$subposition; |
|
821 |
} else { |
|
822 |
$position = int($position); |
|
823 |
$position++; |
|
824 |
} |
|
812 | 825 |
|
813 | 826 |
my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || { 'factor' => 1 }; |
814 | 827 |
|
... | ... | |
826 | 839 |
push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} }, |
827 | 840 |
$projectdescriptions{$form->{"project_id_$i"}}; |
828 | 841 |
|
842 |
if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) { |
|
843 |
$subtotal_header = 0; |
|
844 |
} |
|
845 |
|
|
829 | 846 |
my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"}; |
830 | 847 |
$totalweight += $lineweight; |
831 | 848 |
push @{ $form->{TEMPLATE_ARRAYS}->{weight} }, $form->format_amount($myconfig, $form->{"weight_$i"}, 3); |
Auch abrufbar als: Unified diff
Zwischensummen bei Lieferscheinen
Nummerierung korrekt wie in Aufträgen modifizieren
behebt #2396