Revision 2225b5be
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/Controller/CsvImport/Part.pm | ||
---|---|---|
366 | 366 |
my ($self) = @_; |
367 | 367 |
|
368 | 368 |
my $profile = $self->SUPER::init_profile; |
369 |
delete $profile->{type}; |
|
370 |
|
|
371 |
$::lxdebug->dump(0, "prof", $profile); |
|
369 |
delete @{$profile}{qw(type priceupdate)}; |
|
372 | 370 |
|
373 | 371 |
return $profile; |
374 | 372 |
} |
375 | 373 |
|
374 |
sub save_objects { |
|
375 |
my ($self, %params) = @_; |
|
376 |
|
|
377 |
my $with_number = [ grep { $_->{object}->partnumber ne '####' } @{ $self->controller->data } ]; |
|
378 |
my $without_number = [ grep { $_->{object}->partnumber eq '####' } @{ $self->controller->data } ]; |
|
379 |
|
|
380 |
map { $_->{object}->partnumber('') } @{ $without_number }; |
|
381 |
|
|
382 |
$self->SUPER::save_objects(data => $with_number); |
|
383 |
$self->SUPER::save_objects(data => $without_number); |
|
384 |
} |
|
376 | 385 |
|
377 | 386 |
# TODO: |
378 |
# priceupdate aus Profil raus |
|
379 | 387 |
# CVARs ins Profil rein |
380 | 388 |
|
381 | 389 |
1; |
Auch abrufbar als: Unified diff
Behandlung von neu zu vergebenen Artikelnummern gefixt