From 73a58f3dceeb378343ceb151942828eea686b75a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 29 Nov 2013 10:13:15 +0100 Subject: [PATCH] =?utf8?q?History-Eintrag=20auch=20f=C3=BCr=20Auftrags-Imp?= =?utf8?q?ort=20erzeugen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/CsvImport/Base.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index 5da5fc290..4667677c6 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -466,17 +466,22 @@ sub clean_fields { sub _save_history { my ($self, $object) = @_; - if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors)) { + if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors orders)) { my $snumbers = $self->controller->{type} eq 'parts' ? 'partnumber_' . $object->partnumber : $self->controller->{type} eq 'customers_vendors' ? ($self->table eq 'customer' ? 'customernumber_' . $object->customernumber : 'vendornumber_' . $object->vendornumber) + : $self->controller->{type} eq 'orders' ? 'ordnumber_' . $object->ordnumber : ''; + my $what_done = $self->controller->{type} eq 'orders' ? 'sales_order' + : ''; + SL::DB::History->new( trans_id => $object->id, snumbers => $snumbers, employee_id => $self->controller->{employee_id}, addition => 'SAVED', + what_done => $what_done, )->save(); } } -- 2.20.1