Revision 163e0005
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
SL/Controller/CsvImport/CustomerVendor.pm | ||
---|---|---|
91 | 91 |
push @{ $entry->{information} }, $::locale->text('Illegal characters have been removed from the following fields: #1', join(', ', @cleaned_fields)) |
92 | 92 |
if @cleaned_fields; |
93 | 93 |
|
94 |
my $existing_vc = $vcs_by_number{ $object->$numbercolumn };
|
|
94 |
my $existing_vc = $object->$numbercolumn ? $vcs_by_number{ $object->$numbercolumn } : undef;
|
|
95 | 95 |
if (!$existing_vc) { |
96 | 96 |
$vcs_by_number{ $object->$numbercolumn } = $object if $object->$numbercolumn; |
97 | 97 |
|
... | ... | |
240 | 240 |
my ($self, %params) = @_; |
241 | 241 |
|
242 | 242 |
my $numbercolumn = $self->table . 'number'; |
243 |
my $with_number = [ grep { $_->{object}->$numbercolumn ne '####' } @{ $self->controller->data } ];
|
|
244 |
my $without_number = [ grep { $_->{object}->$numbercolumn eq '####' } @{ $self->controller->data } ];
|
|
243 |
my $with_number = [ grep { ($_->{object}->$numbercolumn || '') ne '####' } @{ $self->controller->data } ];
|
|
244 |
my $without_number = [ grep { ($_->{object}->$numbercolumn || '') eq '####' } @{ $self->controller->data } ];
|
|
245 | 245 |
|
246 | 246 |
$_->{object}->$numbercolumn('') for @{ $without_number }; |
247 | 247 |
|
Auch abrufbar als: Unified diff
CSV-Import CustomerVendor: Warnungen wegen nicht initialisierter Variable vermeiden