From e472e105f202e67e8458bd721d53a431284457b5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 7 Mar 2016 20:00:16 +0100 Subject: [PATCH] ING specific amount modifier. See issue #210 --- app/Helpers/Csv/Converter/INGDebetCredit.php | 34 ++++++++++++++++++++ config/csv.php | 5 +++ resources/lang/en_US/firefly.php | 1 + 3 files changed, 40 insertions(+) create mode 100644 app/Helpers/Csv/Converter/INGDebetCredit.php diff --git a/app/Helpers/Csv/Converter/INGDebetCredit.php b/app/Helpers/Csv/Converter/INGDebetCredit.php new file mode 100644 index 0000000000..e41aee16ac --- /dev/null +++ b/app/Helpers/Csv/Converter/INGDebetCredit.php @@ -0,0 +1,34 @@ +value === 'Af') { + return -1; + } + + return 1; + } +} diff --git a/config/csv.php b/config/csv.php index bf65882ff9..39bd78ff6b 100644 --- a/config/csv.php +++ b/config/csv.php @@ -88,6 +88,11 @@ return [ 'converter' => 'RabobankDebetCredit', 'field' => 'amount-modifier', ], + 'ing-debet-credit' => [ + 'mappable' => false, + 'converter' => 'INGDebetCredit', + 'field' => 'amount-modifier', + ], 'category-id' => [ 'mappable' => true, 'converter' => 'CategoryId', diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 81dc74a139..a7a371b9d9 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -344,6 +344,7 @@ return [ 'csv_column_opposing-id' => 'Opposing account ID (matching Firefly)', 'csv_column_opposing-name' => 'Opposing account (name)', 'csv_column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator', + 'csv_column_ing-debet-credit' => 'ING specific debet/credit indicator', 'csv_column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID', 'csv_column_sepa-ct-op' => 'SEPA Credit Transfer opposing account', 'csv_column_sepa-db' => 'SEPA Direct Debet',