Skip to content

Commit d0683b2

Browse files
Merge pull request #922 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2 parents ef936bc + 31a17a2 commit d0683b2

10 files changed

Lines changed: 217 additions & 189 deletions

File tree

.ci/php-cs-fixer/composer.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

THANKS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Over time, many people have contributed to the Firefly III Data Importer. Their
44
Please find below all the people who contributed to the Firefly III Data Importer code. Their names are mentioned in the year of their first contribution.
55

66
## 2025
7+
- Robin Appelman
8+
- Martijn Klene
79
- DrEthan
810
- Tamás Varga
911
- Odd Stråbø

app/Services/CSV/Conversion/Task/Amount.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,37 @@ private function processAmount(array $transaction): array
4545
{
4646
Log::debug(sprintf('Now at the start of processAmount("%s")', $transaction['amount']));
4747
$amount = null;
48-
if ($this->validAmount((string) $transaction['amount'])) {
48+
if ($this->validAmount((string)$transaction['amount'])) {
4949
Log::debug('Transaction["amount"] value is not NULL, assume this is the correct value.');
5050
$amount = $transaction['amount'];
5151
}
5252

53-
if (null === $amount && $this->validAmount((string) $transaction['amount_debit'])) {
54-
Log::debug(sprintf('Transaction["amount_debit"] value is not NULL ("%s"), assume this is the correct value.', $transaction['amount_debit']));
53+
if (null === $amount && $this->validAmount((string)$transaction['amount_debit'])) {
54+
Log::debug(
55+
sprintf(
56+
'Transaction["amount_debit"] value is not NULL ("%s"), assume this is the correct value.',
57+
$transaction['amount_debit'],
58+
),
59+
);
5560
$amount = $transaction['amount_debit'];
5661
}
5762

58-
if (null === $amount && $this->validAmount((string) $transaction['amount_credit'])) {
63+
if (null === $amount && $this->validAmount((string)$transaction['amount_credit'])) {
5964
Log::debug(
60-
sprintf('Transaction["amount_credit"] value is not NULL ("%s"), assume this is the correct value.', $transaction['amount_credit'])
65+
sprintf(
66+
'Transaction["amount_credit"] value is not NULL ("%s"), assume this is the correct value.',
67+
$transaction['amount_credit'],
68+
),
6169
);
6270
$amount = $transaction['amount_credit'];
6371
}
6472

65-
if (null === $amount && $this->validAmount((string) $transaction['amount_negated'])) {
73+
if (null === $amount && $this->validAmount((string)$transaction['amount_negated'])) {
6674
Log::debug(
67-
sprintf('Transaction["amount_negated"] value is not NULL ("%s"), assume this is the correct value.', $transaction['amount_negated'])
75+
sprintf(
76+
'Transaction["amount_negated"] value is not NULL ("%s"), assume this is the correct value.',
77+
$transaction['amount_negated'],
78+
),
6879
);
6980
$amount = $transaction['amount_negated'];
7081
}
@@ -74,23 +85,23 @@ private function processAmount(array $transaction): array
7485
$transaction['amount_modifier'] = '1';
7586
}
7687
if (array_key_exists('foreign_amount', $transaction)) {
77-
$transaction['foreign_amount'] = (string) $transaction['foreign_amount'];
88+
$transaction['foreign_amount'] = (string)$transaction['foreign_amount'];
7889
}
79-
$amount = (string) $amount;
90+
$amount = (string)$amount;
8091
if ('' === $amount) {
8192
Log::error('Amount is EMPTY. This will give problems further ahead.', $transaction);
8293
unset($transaction['amount_modifier']);
8394

8495
return $transaction;
8596
}
8697
// modify amount:
87-
$amount = bcmul($amount, $transaction['amount_modifier']);
98+
$amount = bcmul($amount, (string) $transaction['amount_modifier']);
8899

89100
Log::debug(sprintf('Amount is now %s.', $amount));
90101

91102
// modify foreign amount
92103
if (array_key_exists('foreign_amount', $transaction)) {
93-
$transaction['foreign_amount'] = bcmul($transaction['foreign_amount'], $transaction['amount_modifier']);
104+
$transaction['foreign_amount'] = bcmul((string) $transaction['foreign_amount'], (string) $transaction['amount_modifier']);
94105
Log::debug(sprintf('FOREIGN amount is now %s.', $transaction['foreign_amount']));
95106
}
96107

app/Services/CSV/Converter/BankDebitCredit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function convert(mixed $value): int
5252
'dbit', // https://subsembly.com/index.html (Banking4 App)
5353
'charge', // not sure which bank but it's insane.
5454
'(-)', // Banco Bolivariano in Ecuador (same opinion as above)
55+
'out', // Wise
5556
];
5657

5758
// Lowercase the value and trim it for comparison.

changelog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## v1.7.9 - 2025-07-31
6+
7+
### Added
8+
- [PR 917](https://github.com/firefly-iii/data-importer/pull/917) (Add OUT as debit indicator) by @icewind1991
9+
10+
### Fixed
11+
- [Issue 10643](https://github.com/firefly-iii/firefly-iii/issues/10643) (Importer failing on an import of ING) reported by @MTijn
12+
513
## v1.7.8 - 2025-07-20
614

715
> ⚠️ Some changes in this release may unexpectedly lead to duplicate transactions. This is caused by changes in the data handling routines. This is unfortunate, but a result of new insights, changed APIs and other minor fixes. My apologies for any inconvenience. I try to avoid these kinds of changes, but it can't always be helped.
@@ -13,7 +21,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1321
- [PR 901](https://github.com/firefly-iii/data-importer/pull/901) by @TomVarga for issue 10609
1422
- [PR 905](https://github.com/firefly-iii/data-importer/pull/905) by @DrEthan77 (This PR fixes issue 10599)
1523

16-
1724
## v1.7.7 - 2025-07-16
1825

1926
### Changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"genkgo/camt": ">=2.10.0"
8686
},
8787
"require-dev": {
88-
"barryvdh/laravel-debugbar": "^3.15",
88+
"barryvdh/laravel-debugbar": "^3.16",
8989
"barryvdh/laravel-ide-helper": "^3.5",
9090
"driftingly/rector-laravel": "^2.0",
9191
"ergebnis/phpstan-rules": "^2.10",

0 commit comments

Comments
 (0)