X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d3d0ccf47f31c79c55ed9da22c1e523289b1cd95..a910619e4c9c90063f5d6a17e51a8da9eadc1ac0:/SL/Controller/CsvImport/Part.pm diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 3add8aff1..ecd212cc8 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -680,7 +680,7 @@ sub handle_makemodel { } } - $entry->{part}->makemodels([ $entry->{part}->makemodels_sorted, @new_makemodels ]) if @new_makemodels; + $entry->{part}->makemodels([ @{$entry->{part}->makemodels_sorted}, @new_makemodels ]) if @new_makemodels; # reindex makemodels my $i = 0; @@ -692,7 +692,9 @@ sub handle_makemodel { sub set_various_fields { my ($self, $entry) = @_; - $entry->{object}->priceupdate(DateTime->now_local); + my $object = $entry->{object_to_save} || $entry->{object}; + + $object->priceupdate(DateTime->now_local); } sub init_profile { @@ -713,7 +715,6 @@ sub save_objects { 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); }