Merge pull request #9150 from paulwer/fix-nordigen-amount

fix: nordigen amount imported as absolute
This commit is contained in:
David Bomba 2024-01-15 08:07:07 +11:00 committed by GitHub
commit 63e6811fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,8 +110,8 @@ class TransactionTransformer implements BankRevenueInterface
$transaction['creditorName'] : null); $transaction['creditorName'] : null);
return [ return [
'nordigen_transaction_id' => $transaction["transactionId"], 'transaction_id' => $transaction["transactionId"],
'amount' => abs((int) $transaction["transactionAmount"]["amount"]), 'amount' => (float) $transaction["transactionAmount"]["amount"],
'currency_id' => $this->convertCurrency($transaction["transactionAmount"]["currency"]), 'currency_id' => $this->convertCurrency($transaction["transactionAmount"]["currency"]),
'category_id' => null, 'category_id' => null,
'category_type' => array_key_exists('additionalInformation', $transaction) ? $transaction["additionalInformation"] : '', 'category_type' => array_key_exists('additionalInformation', $transaction) ? $transaction["additionalInformation"] : '',