Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4a42f524

Von Martin Helmling martin.helmling@octosoft.eu vor etwa 8 Jahren hinzugefügt

  • ID 4a42f524c448afeffef8abcc74467183ac42903b
  • Vorgänger 4ecd8545
  • Nachfolger 14304a6a

MT940-Import: Vordefiniertes Default Profil

- Das Profil muss nicht mehr pro Benutzer angelegt werden

- CSV-Import wird in das Systemenu zum Import verschoben,
Im Menü "Zahlungsverkehr" wird gleich zum MT940 gesprungen
- Updatescript muss auch funktionieren wenn bereits ein MT940 Profil angelegt ist
- Für Login "default" ist is_default irrelevant

Unterschiede anzeigen:

SL/Controller/BankImport.pm
13 13
  my ($self, %params) = @_;
14 14

  
15 15
  my $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => $::myconfig{login});
16
  if ( ! $profile ) {
17
    $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => 'default');
18
  }
16 19
  $self->render('bankimport/form', title => $::locale->text('MT940 import'), profile => $profile ? 1 : 0);
17 20

  
18 21
}
......
30 33
  $file->fh->close;
31 34

  
32 35
  my $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => $::myconfig{login});
36
  if ( ! $profile ) {
37
    $profile = SL::DB::Manager::CsvImportProfile->find_by(name => 'MT940', login => 'default');
38
  }
33 39
  die t8("The MT940 import needs an import profile called MT940") unless $profile;
34 40

  
35 41
  $self->redirect_to(controller => 'controller.pl', action => 'CsvImport/test', 'profile.type' => 'bank_transactions', 'profile.id' => $profile->id, force_profile => 1);
menus/user/00-erp.yaml
677 677
  id: cash_bank_import
678 678
  name: Bank Import
679 679
  order: 500
680
- parent: cash_bank_import
681
  id: cash_bank_import_csv
682
  name: CSV
683
  order: 100
684
  access: bank_transaction
685
  params:
686
    action: CsvImport/new
687
    profile.type: bank_transactions
688
- parent: cash_bank_import
689
  id: cash_bank_import_mt940
690
  name: MT940
691
  order: 200
692 680
  access: bank_transaction
693 681
  params:
694 682
    action: BankImport/upload_mt940
......
1283 1271
  params:
1284 1272
    action: CsvImport/new
1285 1273
    profile.type: ar_transactions
1274
- parent: system_import_csv
1275
  id: cash_bank_import_csv
1276
  name: Bank transactions
1277
  order: 900
1278
  params:
1279
    action: CsvImport/new
1280
    profile.type: bank_transactions
1286 1281
- parent: system
1287 1282
  id: system_templates
1288 1283
  name: Templates
sql/Pg-upgrade2/csv_mt940_add_profile.sql
1
-- @tag: csv_mt940_add_profile
2
-- @description: Default Profile zum Importieren von mt940
3
-- @depends: csv_import_profiles_2
4

  
5
INSERT INTO csv_import_profiles (name,type,is_default,login) VALUES ('MT940','bank_transactions','t','default');
6
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');
7
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');
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'),'update_policy','skip');
9
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');
10
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',';');
11
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','"');
12
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','"');
13
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','[]');
14
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');
15
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');
16

  

Auch abrufbar als: Unified diff