mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 01:11:37 -06:00
ING specific amount modifier. See issue #210
This commit is contained in:
parent
6ad10f1772
commit
e472e105f2
34
app/Helpers/Csv/Converter/INGDebetCredit.php
Normal file
34
app/Helpers/Csv/Converter/INGDebetCredit.php
Normal 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;
|
||||
}
|
||||
}
|
@ -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',
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user