From 9adbf7668b63a144d1191575ca1e8e2a9aa87e02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 20 Oct 2020 12:28:29 +0200 Subject: [PATCH] =?utf8?q?Warenimport:=20Auch=20f=C3=BCr=20object=5Fto=5Fs?= =?utf8?q?ave=20priceupdate=20berechnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ansonsten wird in neuer Preis angelegt, aber in der Basis-Maske stimmt die Information "Erneuert am" dann nicht. Das ist etwas irreführend. --- SL/Controller/CsvImport/Part.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.20.1