From cae9317b1c04e96efef964c549e7db41af782f37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 9 Jul 2018 10:44:50 +0200 Subject: [PATCH] =?utf8?q?CSV-Import=20Auftr=C3=A4ge:=20Bei=20History-Eint?= =?utf8?q?rag=20zwischen=20Ver-=20und=20Einkauf=20unterscheiden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/CsvImport/Base.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index 85eb6fa67..9e8956f22 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -603,8 +603,10 @@ sub _save_history { : $self->controller->{type} eq 'ar_transactions' ? 'invnumber_' . $object->invnumber : ''; - my $what_done = $self->controller->{type} eq 'orders' ? 'sales_order' - : ''; + my $what_done = ''; + if ($self->controller->{type} eq 'orders') { + $what_done = $object->customer_id ? 'sales_order' : 'purchase_order'; + } SL::DB::History->new( trans_id => $object->id, -- 2.20.1