From: Bernd Bleßmann Date: Fri, 29 Nov 2013 09:13:15 +0000 (+0100) Subject: History-Eintrag auch für Auftrags-Import erzeugen. X-Git-Tag: release-3.1.0beta1~22^2~110 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=73a58f3dceeb378343ceb151942828eea686b75a;p=kivitendo-erp.git History-Eintrag auch für Auftrags-Import erzeugen. --- 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(); } }