X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FCsvImport%2FBankTransaction.pm;h=8b5b5e7023e3743c15ff1c6c4a45374581c51d05;hb=c2e4989097c6a6817e6c4d7bbabf70e43f14253d;hp=db22be0638aad5d2639f1362b672d77fc885cca8;hpb=12b522fa1375e36d6985663f5679abd05303ee45;p=kivitendo-erp.git diff --git a/SL/Controller/CsvImport/BankTransaction.pm b/SL/Controller/CsvImport/BankTransaction.pm index db22be063..8b5b5e702 100644 --- a/SL/Controller/CsvImport/BankTransaction.pm +++ b/SL/Controller/CsvImport/BankTransaction.pm @@ -175,20 +175,12 @@ sub join_purposes { my $object = $entry->{object}; - my $purpose = join(' ', $entry->{raw_data}->{purpose}, - $entry->{raw_data}->{purpose1}, - $entry->{raw_data}->{purpose2}, - $entry->{raw_data}->{purpose3}, - $entry->{raw_data}->{purpose4}, - $entry->{raw_data}->{purpose5}, - $entry->{raw_data}->{purpose6}, - $entry->{raw_data}->{purpose7}, - $entry->{raw_data}->{purpose8}, - $entry->{raw_data}->{purpose9}, - $entry->{raw_data}->{purpose10}, - $entry->{raw_data}->{purpose11}, - $entry->{raw_data}->{purpose12}, - $entry->{raw_data}->{purpose13} ); + my $purpose = + join ' ', + grep { ($_ // '') !~ m{^ *$} } + map { $entry->{raw_data}->{"purpose$_"} } + ('', 1..13); + $object->purpose($purpose); }