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);
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};
}