X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FController%2FCsvImport%2FBankTransaction.pm;h=d6a7e87aa3880fb8b08b4941b61d6fc2bb03fea6;hb=4825c38f5775010136ae10a147dbb9bdc1194f16;hp=5be896860262ea6aa83e2245273e125e52f5b1ef;hpb=58fae0f653cebc6e6773b39606f0f1892bdb680c;p=kivitendo-erp.git diff --git a/SL/Controller/CsvImport/BankTransaction.pm b/SL/Controller/CsvImport/BankTransaction.pm index 5be896860..d6a7e87aa 100644 --- a/SL/Controller/CsvImport/BankTransaction.pm +++ b/SL/Controller/CsvImport/BankTransaction.pm @@ -83,25 +83,29 @@ sub check_existing { }; } +sub _displayable_columns { + ( + { name => 'local_bank_code', description => $::locale->text('Own bank code') }, + { name => 'local_account_number', description => $::locale->text('Own bank account number or IBAN') }, + { name => 'local_bank_account_id', description => $::locale->text('ID of own bank account') }, + { name => 'remote_bank_code', description => $::locale->text('Bank code of the goal/source') }, + { name => 'remote_account_number', description => $::locale->text('Account number of the goal/source') }, + { name => 'transdate', description => $::locale->text('Date of transaction') }, + { name => 'valutadate', description => $::locale->text('Valuta date') }, + { name => 'amount', description => $::locale->text('Amount') }, + { name => 'currency', description => $::locale->text('Currency') }, + { name => 'currency_id', description => $::locale->text('Currency (database ID)') }, + { name => 'remote_name', description => $::locale->text('Name of the goal/source (if field names remote_name and remote_name_1 exist they will be combined into field "remote_name")') }, + { name => 'purpose', description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') } + ); +} + sub setup_displayable_columns { my ($self) = @_; $self->SUPER::setup_displayable_columns; - # TODO: don't show fields cleared, invoice_amount and transaction_id in the help text, as these should not be imported - $self->add_displayable_columns({ name => 'local_bank_code', description => $::locale->text('Own bank code') }, - { name => 'local_account_number', description => $::locale->text('Own bank account number or IBAN') }, - { name => 'local_bank_account_id', description => $::locale->text('ID of own bank account') }, - { name => 'remote_bank_code', description => $::locale->text('Bank code of the goal/source') }, - { name => 'remote_account_number', description => $::locale->text('Account number of the goal/source') }, - { name => 'transdate', description => $::locale->text('Date of transaction') }, - { name => 'valutadate', description => $::locale->text('Valuta date') }, - { name => 'amount', description => $::locale->text('Amount') }, - { name => 'currency', description => $::locale->text('Currency') }, - { name => 'currency_id', description => $::locale->text('Currency (database ID)') }, - { name => 'remote_name', description => $::locale->text('Name of the goal/source (if field names remote_name and remote_name_1 exist they will be combined into field "remote_name")') }, - { name => 'purpose', description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') }, - ); + $self->add_displayable_columns($self->_displayable_columns); } sub check_bank_account { @@ -148,7 +152,6 @@ sub check_bank_account { $object->local_bank_account_id($bank_account->id); $entry->{info_data}->{local_bank_name} = $bank_account->name; } - return $object->local_bank_account_id ? 1 : 0; } @@ -183,4 +186,8 @@ sub join_remote_names { $object->remote_name($remote_name); } +sub check_auth { + $::auth->assert('config') if ! $::auth->assert('bank_transaction',1); +} + 1;