From: Moritz Bunkus Date: Thu, 3 Mar 2011 09:40:34 +0000 (+0100) Subject: Preisaktualisierung bestehender Artikel X-Git-Tag: release-2.7.0beta1~396^2~14 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9d6a2ef23cd5586ed4ea3d5a8d59362220251d68;p=kivitendo-erp.git Preisaktualisierung bestehender Artikel --- diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index b6bf80117..a61b03f29 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -296,7 +296,9 @@ sub save_objects { foreach my $entry (@{ $data }) { next if @{ $entry->{errors} }; - if (!$entry->{object}->save) { + my $object = $entry->{object_to_save} || $entry->{object}; + + if (!$object->save) { push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $entry->{object}->db->error); } else { $self->controller->num_imported($self->controller->num_imported + 1); diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 4f1278ac4..6756ad676 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -192,7 +192,7 @@ sub check_existing { if ($self->settings->{article_number_policy} eq 'update_prices') { if ($entry->{part}) { - map { $object->$_( $entry->{part}->$_ ) } qw(sellprice listprice lastcost); + map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost min_sellprice); push @{ $entry->{information} }, $::locale->text('Updating prices of existing entry in database'); $entry->{object_to_save} = $entry->{part}; }