From: Bernd Bleßmann Date: Fri, 29 Nov 2013 09:10:46 +0000 (+0100) Subject: Auftragsimport: nur Orders, nicht OrderItems explizit speichern. X-Git-Tag: release-3.1.0beta1~22^2~111 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c049c916806a208b33a2f1e8b2292946ed1d6202;p=kivitendo-erp.git Auftragsimport: nur Orders, nicht OrderItems explizit speichern. --- 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()); }