From: Bernd Bleßmann Date: Tue, 6 Apr 2021 14:43:31 +0000 (+0200) Subject: CSV-Importe: Warnungen wegen nicht initialisierter Variable vermeiden X-Git-Tag: kivitendo-mebil_0.1-0~9^2~378 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1464e864c1823bf48731916e9dc4c481a8d9bdba;p=kivitendo-erp.git CSV-Importe: Warnungen wegen nicht initialisierter Variable vermeiden --- diff --git a/SL/Controller/CsvImport/BankTransaction.pm b/SL/Controller/CsvImport/BankTransaction.pm index 8b5b5e702..77063738c 100644 --- a/SL/Controller/CsvImport/BankTransaction.pm +++ b/SL/Controller/CsvImport/BankTransaction.pm @@ -41,7 +41,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); my $update_policy = $self->controller->profile->get('update_policy') || 'skip'; - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/CustomerVendor.pm b/SL/Controller/CsvImport/CustomerVendor.pm index 8fc893d11..092c6fde5 100644 --- a/SL/Controller/CsvImport/CustomerVendor.pm +++ b/SL/Controller/CsvImport/CustomerVendor.pm @@ -68,7 +68,7 @@ sub check_objects { my %vcs_by_number = map { ( $_->$numbercolumn => $_ ) } @{ $self->existing_objects }; my $methods = $self->controller->headers->{methods}; - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/Inventory.pm b/SL/Controller/CsvImport/Inventory.pm index 238abf33a..c724fb8fc 100644 --- a/SL/Controller/CsvImport/Inventory.pm +++ b/SL/Controller/CsvImport/Inventory.pm @@ -79,7 +79,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/Project.pm b/SL/Controller/CsvImport/Project.pm index 4b846dc27..4fea748c5 100644 --- a/SL/Controller/CsvImport/Project.pm +++ b/SL/Controller/CsvImport/Project.pm @@ -32,7 +32,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/Shipto.pm b/SL/Controller/CsvImport/Shipto.pm index b4d9e0041..1ca25ad86 100644 --- a/SL/Controller/CsvImport/Shipto.pm +++ b/SL/Controller/CsvImport/Shipto.pm @@ -24,7 +24,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;