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);
}
$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);
id: cash_bank_import
name: Bank Import
order: 500
-- parent: cash_bank_import
- id: cash_bank_import_csv
- name: CSV
- order: 100
- access: bank_transaction
- params:
- action: CsvImport/new
- profile.type: bank_transactions
-- parent: cash_bank_import
- id: cash_bank_import_mt940
- name: MT940
- order: 200
access: bank_transaction
params:
action: BankImport/upload_mt940
params:
action: CsvImport/new
profile.type: ar_transactions
+- parent: system_import_csv
+ id: cash_bank_import_csv
+ name: Bank transactions
+ order: 900
+ params:
+ action: CsvImport/new
+ profile.type: bank_transactions
- parent: system
id: system_templates
name: Templates
--- /dev/null
+-- @tag: csv_mt940_add_profile
+-- @description: Default Profile zum Importieren von mt940
+-- @depends: csv_import_profiles_2
+
+INSERT INTO csv_import_profiles (name,type,is_default,login) VALUES ('MT940','bank_transactions','t','default');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'charset','UTF-8');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'full_preview','0');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'update_policy','skip');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'numberformat','1000.00');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'sep_char',';');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'quote_char','"');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'escape_char','"');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'json_mappings','[]');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'duplicates','no_check');
+INSERT INTO csv_import_profile_settings (csv_import_profile_id,key,value) VALUES ((SELECT id FROM csv_import_profiles WHERE name='MT940' AND login='default'),'dont_edit_profile','1');
+