mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 11:59:05 +00:00
ING specific amount modifier. See issue #210
This commit is contained in:
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',
|
'converter' => 'RabobankDebetCredit',
|
||||||
'field' => 'amount-modifier',
|
'field' => 'amount-modifier',
|
||||||
],
|
],
|
||||||
|
'ing-debet-credit' => [
|
||||||
|
'mappable' => false,
|
||||||
|
'converter' => 'INGDebetCredit',
|
||||||
|
'field' => 'amount-modifier',
|
||||||
|
],
|
||||||
'category-id' => [
|
'category-id' => [
|
||||||
'mappable' => true,
|
'mappable' => true,
|
||||||
'converter' => 'CategoryId',
|
'converter' => 'CategoryId',
|
||||||
|
|||||||
@@ -344,6 +344,7 @@ return [
|
|||||||
'csv_column_opposing-id' => 'Opposing account ID (matching Firefly)',
|
'csv_column_opposing-id' => 'Opposing account ID (matching Firefly)',
|
||||||
'csv_column_opposing-name' => 'Opposing account (name)',
|
'csv_column_opposing-name' => 'Opposing account (name)',
|
||||||
'csv_column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator',
|
'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-id' => 'SEPA Credit Transfer end-to-end ID',
|
||||||
'csv_column_sepa-ct-op' => 'SEPA Credit Transfer opposing account',
|
'csv_column_sepa-ct-op' => 'SEPA Credit Transfer opposing account',
|
||||||
'csv_column_sepa-db' => 'SEPA Direct Debet',
|
'csv_column_sepa-db' => 'SEPA Direct Debet',
|
||||||
|
|||||||
Reference in New Issue
Block a user