Revision 73a58f3d
Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
466 | 466 |
sub _save_history { |
467 | 467 |
my ($self, $object) = @_; |
468 | 468 |
|
469 |
if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors)) { |
|
469 |
if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors orders)) {
|
|
470 | 470 |
my $snumbers = $self->controller->{type} eq 'parts' ? 'partnumber_' . $object->partnumber |
471 | 471 |
: $self->controller->{type} eq 'customers_vendors' ? |
472 | 472 |
($self->table eq 'customer' ? 'customernumber_' . $object->customernumber : 'vendornumber_' . $object->vendornumber) |
473 |
: $self->controller->{type} eq 'orders' ? 'ordnumber_' . $object->ordnumber |
|
473 | 474 |
: ''; |
474 | 475 |
|
476 |
my $what_done = $self->controller->{type} eq 'orders' ? 'sales_order' |
|
477 |
: ''; |
|
478 |
|
|
475 | 479 |
SL::DB::History->new( |
476 | 480 |
trans_id => $object->id, |
477 | 481 |
snumbers => $snumbers, |
478 | 482 |
employee_id => $self->controller->{employee_id}, |
479 | 483 |
addition => 'SAVED', |
484 |
what_done => $what_done, |
|
480 | 485 |
)->save(); |
481 | 486 |
} |
482 | 487 |
} |
Auch abrufbar als: Unified diff
History-Eintrag auch für Auftrags-Import erzeugen.