Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 163e0005

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID 163e000563f99042490a32a31996442dba64890b
  • Vorgänger 1464e864
  • Nachfolger 86d70efe

CSV-Import CustomerVendor: Warnungen wegen nicht initialisierter Variable vermeiden

Unterschiede anzeigen:

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