Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 45cd4d0a

Von Sven Schöling vor mehr als 7 Jahren hinzugefügt

  • ID 45cd4d0a939886769833995855d38f9577604ab3
  • Vorgänger 975304c7
  • Nachfolger 543b7743

CsvImport: Warnungen: Uninitialisierte Variablen

Unterschiede anzeigen:

SL/Controller/CsvImport/Base.pm
188 188
                    vendors   => { map { ( $_->vendornumber   => $_ ) } @{ $self->all_vc->{vendors}   } } );
189 189
  my %by_name   = ( customers => { map { ( $_->name           => $_ ) } @{ $self->all_vc->{customers} } },
190 190
                    vendors   => { map { ( $_->name           => $_ ) } @{ $self->all_vc->{vendors}   } } );
191
  my %by_gln    = ( customers => { map { ( $_->gln            => $_ ) } @{ $self->all_vc->{customers} } },
192
                    vendors   => { map { ( $_->gln            => $_ ) } @{ $self->all_vc->{vendors}   } } );
191
  my %by_gln    = ( customers => { map { ( $_->gln            => $_ ) } grep $_->gln, @{ $self->all_vc->{customers} } },
192
                    vendors   => { map { ( $_->gln            => $_ ) } grep $_->gln, @{ $self->all_vc->{vendors}   } } );
193 193

  
194 194
  return { id     => \%by_id,
195 195
           number => \%by_number,
......
200 200
sub init_vc_counts_by {
201 201
  my ($self) = @_;
202 202

  
203
  my $vc_counts_by;
203
  my $vc_counts_by = {};
204 204

  
205 205
  $vc_counts_by->{number}->{customers}->{$_->customernumber}++ for @{ $self->all_vc->{customers} };
206 206
  $vc_counts_by->{number}->{vendors}->  {$_->vendornumber}++   for @{ $self->all_vc->{vendors} };
207 207
  $vc_counts_by->{name}->  {customers}->{$_->name}++           for @{ $self->all_vc->{customers} };
208 208
  $vc_counts_by->{name}->  {vendors}->  {$_->name}++           for @{ $self->all_vc->{vendors} };
209
  $vc_counts_by->{gln}->   {customers}->{$_->gln}++            for @{ $self->all_vc->{customers} };
210
  $vc_counts_by->{gln}->   {vendors}->  {$_->gln}++            for @{ $self->all_vc->{vendors} };
209
  $vc_counts_by->{gln}->   {customers}->{$_->gln}++            for grep $_->gln, @{ $self->all_vc->{customers} };
210
  $vc_counts_by->{gln}->   {vendors}->  {$_->gln}++            for grep $_->gln, @{ $self->all_vc->{vendors} };
211 211

  
212 212
  return $vc_counts_by;
213 213
}

Auch abrufbar als: Unified diff