X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6ebec7f9d7ddef3e7f8befb797314c89e1414635..c954dea7c1b814d66b8c31d04fa70a1bbbcce71e:/SL/Controller/BankImport.pm diff --git a/SL/Controller/BankImport.pm b/SL/Controller/BankImport.pm index 867589f10..7206eb8ea 100644 --- a/SL/Controller/BankImport.pm +++ b/SL/Controller/BankImport.pm @@ -13,6 +13,9 @@ sub action_upload_mt940 { my ($self, %params) = @_; my $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => $::myconfig{login}); + if ( ! $profile ) { + $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => 'default'); + } $self->render('bankimport/form', title => $::locale->text('MT940 import'), profile => $profile ? 1 : 0); } @@ -30,6 +33,9 @@ sub action_import_mt940 { $file->fh->close; my $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => $::myconfig{login}); + if ( ! $profile ) { + $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => 'default'); + } die t8("The MT940 import needs an import profile called MT940") unless $profile; $self->redirect_to(controller => 'controller.pl', action => 'CsvImport/test', 'profile.type' => 'bank_transactions', 'profile.id' => $profile->id, force_profile => 1);