From: Jan Büren Date: Tue, 20 Oct 2020 10:28:29 +0000 (+0200) Subject: Warenimport: Auch für object_to_save priceupdate berechnen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~740 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9adbf7668b63a144d1191575ca1e8e2a9aa87e02;p=kivitendo-erp.git Warenimport: Auch für object_to_save priceupdate berechnen Ansonsten wird in neuer Preis angelegt, aber in der Basis-Maske stimmt die Information "Erneuert am" dann nicht. Das ist etwas irreführend. --- diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 3add8aff1..83e09d652 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -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); }