ING specific amount modifier. See issue #210

This commit is contained in:
James Cole 2016-03-07 20:00:16 +01:00
parent 6ad10f1772
commit e472e105f2
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,34 @@
<?php
/**
* INGDebetCredit.php
* Copyright (C) 2016 Sander Dorigo
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Csv\Converter;
/**
* Class INGDebetCredit
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class INGDebetCredit extends BasicConverter implements ConverterInterface
{
/**
* @return int
*/
public function convert()
{
if ($this->value === 'Af') {
return -1;
}
return 1;
}
}

View File

@ -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',

View File

@ -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',