Revision 8ecc78d6
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/Controller/CsvImport/Part.pm | ||
---|---|---|
198 | 198 |
|
199 | 199 |
if ($self->settings->{article_number_policy} eq 'update_prices') { |
200 | 200 |
if ($entry->{part}) { |
201 |
map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost prices); |
|
201 |
map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost); |
|
202 |
|
|
203 |
# merge prices |
|
204 |
my %prices_by_pricegroup_id = map { $_->pricegroup->id => $_ } $entry->{part}->prices, $object->prices; |
|
205 |
$entry->{part}->prices(grep { $_ } map { $prices_by_pricegroup_id{$_->id} } @{ $self->all_pricegroups }); |
|
206 |
|
|
202 | 207 |
push @{ $entry->{information} }, $::locale->text('Updating prices of existing entry in database'); |
203 | 208 |
$entry->{object_to_save} = $entry->{part}; |
204 | 209 |
} |
Auch abrufbar als: Unified diff
Besseres Handling von unvollständigen Preisgruppenimporten