1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Fixes for variable display

This commit is contained in:
David Bomba 2024-02-16 08:46:01 +11:00
parent 8039c1a19d
commit 8bc42c62af

View File

@ -110,7 +110,7 @@ class TransactionTransformer implements BankRevenueInterface
}
// enrich description with currencyExchange informations
if (array_key_exists('currencyExchange', $transaction)) {
if (isset($transaction['currencyExchange'])) {
foreach ($transaction["currencyExchange"] as $exchangeRate) {
$targetAmount = round($amount * (float) ($exchangeRate["exchangeRate"] ?? 1) , 2);
$description .= '\nexchangeRate: ' . $amount . " " . ($exchangeRate["sourceCurrency"] ?? '?') . " = " . $targetAmount . " " . ($exchangeRate["targetCurrency"] ?? '?') . " (" . ($exchangeRate["quotationDate"] ?? '?') . ")";