From: Moritz Bunkus Date: Wed, 2 Mar 2011 13:58:54 +0000 (+0100) Subject: Behandlung von neu zu vergebenen Artikelnummern gefixt X-Git-Tag: release-2.7.0beta1~396^2~29 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2225b5bef82758d567e24be5c3f00e1d439fbe26;p=kivitendo-erp.git Behandlung von neu zu vergebenen Artikelnummern gefixt --- diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index d42a2db41..9d0e66ba3 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -366,16 +366,24 @@ sub init_profile { my ($self) = @_; my $profile = $self->SUPER::init_profile; - delete $profile->{type}; - - $::lxdebug->dump(0, "prof", $profile); + delete @{$profile}{qw(type priceupdate)}; return $profile; } +sub save_objects { + my ($self, %params) = @_; + + my $with_number = [ grep { $_->{object}->partnumber ne '####' } @{ $self->controller->data } ]; + my $without_number = [ grep { $_->{object}->partnumber eq '####' } @{ $self->controller->data } ]; + + map { $_->{object}->partnumber('') } @{ $without_number }; + + $self->SUPER::save_objects(data => $with_number); + $self->SUPER::save_objects(data => $without_number); +} # TODO: -# priceupdate aus Profil raus # CVARs ins Profil rein 1;