From 1870f11e7915b768e83e18f8491f1e13d0702ead Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 12 Aug 2013 15:09:14 +0200 Subject: [PATCH] Kosmetik: Leerzeichen am Zeilenende entfernt. --- SL/Controller/CsvImport.pm | 4 ++-- SL/Controller/CsvImport/BaseMulti.pm | 3 +-- SL/Controller/CsvImport/Order.pm | 1 - SL/Helper/Csv.pm | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index f21cd2a46..7fa20a7e1 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -557,7 +557,7 @@ sub save_report_multi { my $row_ident = $self->worker->profile->[$i]->{row_ident}; my $n_info_methods = $info_methods->{$row_ident} ? scalar @{ $info_methods->{$row_ident} } : 0; my $n_methods = $methods->{$row_ident} ? scalar @{ $methods->{$row_ident} } : 0; - + $off1->{$row_ident} = $n_info_methods; $off2->{$row_ident} = $off1->{$row_ident} + $n_methods; } @@ -571,7 +571,7 @@ sub save_report_multi { my $o1 = $off1->{$row_ident}; my $o2 = $off2->{$row_ident}; - + $sth->execute($report->id, $_, $row + $n_header_rows, $data_row->{info_data}{ $info_methods->{$row_ident}->[$_] }) for 0 .. $#{ $info_methods->{$row_ident} }; $sth->execute($report->id, $o1 + $_, $row + $n_header_rows, $data_row->{object}->${ \ $methods->{$row_ident}->[$_] }) for 0 .. $#{ $methods->{$row_ident} }; $sth->execute($report->id, $o2 + $_, $row + $n_header_rows, $data_row->{raw_data}{ $raw_methods->{$row_ident}->[$_] }) for 0 .. $#{ $raw_methods->{$row_ident} }; diff --git a/SL/Controller/CsvImport/BaseMulti.pm b/SL/Controller/CsvImport/BaseMulti.pm index 2f31be6d7..92faaa993 100644 --- a/SL/Controller/CsvImport/BaseMulti.pm +++ b/SL/Controller/CsvImport/BaseMulti.pm @@ -74,7 +74,6 @@ sub run { } $self->controller->raw_data_headers($raw_data_headers); $self->controller->info_headers($info_headers); - my @objects = $self->csv->get_objects; $self->controller->track_progress(progress => 70); @@ -101,7 +100,7 @@ sub run { sub add_columns { my ($self, $row_ident, @columns) = @_; - + my $h = $self->controller->headers->{$row_ident}; foreach my $column (grep { !$h->{used}->{$_} } @columns) { diff --git a/SL/Controller/CsvImport/Order.pm b/SL/Controller/CsvImport/Order.pm index bcf098da8..8eebb28b8 100644 --- a/SL/Controller/CsvImport/Order.pm +++ b/SL/Controller/CsvImport/Order.pm @@ -308,7 +308,6 @@ sub check_objects { $self->check_project($entry, global => 0); $self->check_price_factor($entry); $self->check_pricegroup($entry); - } } diff --git a/SL/Helper/Csv.pm b/SL/Helper/Csv.pm index d0399e0e9..c5d2f4aee 100644 --- a/SL/Helper/Csv.pm +++ b/SL/Helper/Csv.pm @@ -231,7 +231,7 @@ sub _header_by_row { if ($self->is_multiplexed && ! defined $self->_row_header ) { $self->_row_header({ pairwise { $a->{row_ident} => $b } @{ $self->profile }, @{ $self->header } }); } - + if ($self->is_multiplexed) { return $self->_row_header->{$row->[0]} } else { -- 2.20.1