mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Small change in conversion
This commit is contained in:
parent
5a02006a42
commit
70ddbd743c
@ -63,10 +63,10 @@ trait ConvertsExchangeRates
|
||||
$return = [];
|
||||
/** @var array $entry */
|
||||
foreach ($entries as $entry) {
|
||||
$currency = $this->getCurrency((int) $entry['id']);
|
||||
$entry['converted'] = true;
|
||||
$currency = $this->getCurrency((int) $entry['id']);
|
||||
if ($currency->id !== $native->id) {
|
||||
$amount = $this->convertAmount($entry['sum'], $currency, $native);
|
||||
$entry['converted'] = true;
|
||||
$entry['native_sum'] = $amount;
|
||||
$entry['native_id'] = (string) $native->id;
|
||||
$entry['native_name'] = $native->name;
|
||||
@ -75,6 +75,7 @@ trait ConvertsExchangeRates
|
||||
$entry['native_decimal_places'] = $native->decimal_places;
|
||||
}
|
||||
if ($currency->id === $native->id) {
|
||||
$entry['converted'] = false;
|
||||
$entry['native_sum'] = $entry['sum'];
|
||||
$entry['native_id'] = (string) $native->id;
|
||||
$entry['native_name'] = $native->name;
|
||||
|
Loading…
Reference in New Issue
Block a user