1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
This commit is contained in:
paulwer 2024-02-18 18:19:16 +01:00
parent 8e50ae9691
commit a7f2e438f2

View File

@ -112,8 +112,8 @@ class TransactionTransformer implements BankRevenueInterface
// enrich description with currencyExchange informations
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"] ?? '?') . ")";
$targetAmount = round($amount * (float) ($exchangeRate["exchangeRate"] ?? 1), 2);
$description .= '\n' + ctrans('texts.exchange_rate') + ': ' . $amount . " " . ($exchangeRate["sourceCurrency"] ?? '?') . " = " . $targetAmount . " " . ($exchangeRate["targetCurrency"] ?? '?') . " (" . ($exchangeRate["quotationDate"] ?? '?') . ")";
}
}