From c049c916806a208b33a2f1e8b2292946ed1d6202 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 29 Nov 2013 10:10:46 +0100 Subject: [PATCH] Auftragsimport: nur Orders, nicht OrderItems explizit speichern. --- SL/Controller/CsvImport/Order.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SL/Controller/CsvImport/Order.pm b/SL/Controller/CsvImport/Order.pm index 75ffd9b27..907d900a2 100644 --- a/SL/Controller/CsvImport/Order.pm +++ b/SL/Controller/CsvImport/Order.pm @@ -762,11 +762,12 @@ sub save_objects { # set order number and collect to save my $objects_to_save; foreach my $entry (@{ $self->controller->data }) { + next if $entry->{raw_data}->{datatype} ne $self->_order_column; next if @{ $entry->{errors} }; - if ($entry->{raw_data}->{datatype} eq $self->_order_column && !$entry->{object}->ordnumber) { - my $number = SL::TransNumber->new(type => 'sales_order', - save => 1); + if (!$entry->{object}->ordnumber) { + my $number = SL::TransNumber->new(type => 'sales_order', + save => 1); $entry->{object}->ordnumber($number->create_unique()); } -- 2.20.1