X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b9d025079a0ea00235e47c249a1d00dde90cb3cb..201c9038c6c64d91b9be59991b6b6449c33a0d4f:/SL/Controller/CsvImport/BankTransaction.pm diff --git a/SL/Controller/CsvImport/BankTransaction.pm b/SL/Controller/CsvImport/BankTransaction.pm index addcb016d..5397d27d9 100644 --- a/SL/Controller/CsvImport/BankTransaction.pm +++ b/SL/Controller/CsvImport/BankTransaction.pm @@ -56,6 +56,7 @@ sub check_objects { } $self->add_info_columns({ header => $::locale->text('Bank account'), method => 'local_bank_name' }); + $self->add_raw_data_columns("currency", "currency_id") if grep { /^currency(?:_id)?$/ } @{ $self->csv->header }; } sub check_existing { @@ -87,7 +88,6 @@ sub setup_displayable_columns { $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') }, @@ -100,6 +100,8 @@ sub setup_displayable_columns { { 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")') }, + { name => 'transactionCode', description => $::locale->text('Transaction Code') }, + { name => 'transactionText', description => $::locale->text('Transaction Text') }, ); } @@ -147,7 +149,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; } @@ -182,4 +183,8 @@ sub join_remote_names { $object->remote_name($remote_name); } +sub check_auth { + $::auth->assert('config') if ! $::auth->assert('bank_transaction',1); +} + 1;