Revision f26083d9
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/Invoice.pm | ||
---|---|---|
7 | 7 |
|
8 | 8 |
use Carp; |
9 | 9 |
use List::Util qw(first); |
10 |
use List::MoreUtils qw(pairwise); |
|
11 | 10 |
|
12 | 11 |
use SL::DB::MetaSetup::Invoice; |
13 | 12 |
use SL::DB::Manager::Invoice; |
... | ... | |
16 | 15 |
use SL::DB::Helper::PriceTaxCalculator; |
17 | 16 |
use SL::DB::Helper::PriceUpdater; |
18 | 17 |
use SL::DB::Helper::TransNumberGenerator; |
19 |
use SL::DB::CustomVariable; |
|
20 | 18 |
|
21 | 19 |
__PACKAGE__->meta->add_relationship( |
22 | 20 |
invoiceitems => { |
... | ... | |
162 | 160 |
fxsellprice => $source_item->sellprice,); |
163 | 161 |
} @{ $source->items_sorted }; |
164 | 162 |
|
165 |
my $i = 0; |
|
166 |
foreach my $item (@items) { |
|
167 |
my $source_cvars = $source->items_sorted->[$i]->cvars_by_config; |
|
168 |
my $target_cvars = $item->cvars_by_config; |
|
169 |
pairwise { $a->value($b->value) } @{ $target_cvars }, @{ $source_cvars }; |
|
170 |
$i++; |
|
171 |
} |
|
172 |
|
|
173 | 163 |
$invoice->invoiceitems(\@items); |
174 | 164 |
|
175 | 165 |
return $invoice; |
Auch abrufbar als: Unified diff
Revert "Überlagerte benutzerdefinierte Variablen werden in wiederkehrende Rechnungen nicht übernommen"
This reverts commit 5bd7e74db1f425a8bbc43357e949efcc1d4eb135.