Revision 0ec75909
Von Sven Schöling vor fast 9 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
200 | 200 |
} |
201 | 201 |
|
202 | 202 |
if (!$entry->{object}->$id_column) { |
203 |
my $vc = $self->vc_by->{number}->{customers}->{ $entry->{raw_data}->{customernumber} }
|
|
204 |
|| $self->vc_by->{number}->{vendors}->{ $entry->{raw_data}->{vendornumber} };
|
|
203 |
my $vc = ($entry->{raw_data}->{customernumber} && $self->vc_by->{number}->{customers}->{ $entry->{raw_data}->{customernumber} })
|
|
204 |
|| ($entry->{raw_data}->{vendornumber} && $self->vc_by->{number}->{vendors}->{ $entry->{raw_data}->{vendornumber} });
|
|
205 | 205 |
$entry->{object}->$id_column($vc->id) if $vc; |
206 | 206 |
} |
207 | 207 |
|
... | ... | |
522 | 522 |
sub _save_history { |
523 | 523 |
my ($self, $object) = @_; |
524 | 524 |
|
525 |
if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors orders ar_transactions)) { |
|
525 |
if (any { $self->controller->{type} && $_ eq $self->controller->{type} } qw(parts customers_vendors orders ar_transactions)) {
|
|
526 | 526 |
my $snumbers = $self->controller->{type} eq 'parts' ? 'partnumber_' . $object->partnumber |
527 | 527 |
: $self->controller->{type} eq 'customers_vendors' ? |
528 | 528 |
($self->table eq 'customer' ? 'customernumber_' . $object->customernumber : 'vendornumber_' . $object->vendornumber) |
Auch abrufbar als: Unified diff
warnings: diverse nicht initialisierte hash keys in CsvImport