]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/CsvImport/Part.pm
Inventory: doku typos
[mfinanz.git] / SL / Controller / CsvImport / Part.pm
index 3add8aff141443ef323d37818217d4c52956b2dd..ecd212cc88f156278256c718c22a3c9518a6008c 100644 (file)
@@ -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;
 
   # reindex makemodels
   my $i = 0;
@@ -692,7 +692,9 @@ sub handle_makemodel {
 sub set_various_fields {
   my ($self, $entry) = @_;
 
 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 {
 }
 
 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 };
   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);
 }
   $self->SUPER::save_objects(data => $with_number);
   $self->SUPER::save_objects(data => $without_number);
 }