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
@ -64,9 +64,9 @@ trait ConvertsExchangeRates
|
|||||||
/** @var array $entry */
|
/** @var array $entry */
|
||||||
foreach ($entries as $entry) {
|
foreach ($entries as $entry) {
|
||||||
$currency = $this->getCurrency((int) $entry['id']);
|
$currency = $this->getCurrency((int) $entry['id']);
|
||||||
$entry['converted'] = true;
|
|
||||||
if ($currency->id !== $native->id) {
|
if ($currency->id !== $native->id) {
|
||||||
$amount = $this->convertAmount($entry['sum'], $currency, $native);
|
$amount = $this->convertAmount($entry['sum'], $currency, $native);
|
||||||
|
$entry['converted'] = true;
|
||||||
$entry['native_sum'] = $amount;
|
$entry['native_sum'] = $amount;
|
||||||
$entry['native_id'] = (string) $native->id;
|
$entry['native_id'] = (string) $native->id;
|
||||||
$entry['native_name'] = $native->name;
|
$entry['native_name'] = $native->name;
|
||||||
@ -75,6 +75,7 @@ trait ConvertsExchangeRates
|
|||||||
$entry['native_decimal_places'] = $native->decimal_places;
|
$entry['native_decimal_places'] = $native->decimal_places;
|
||||||
}
|
}
|
||||||
if ($currency->id === $native->id) {
|
if ($currency->id === $native->id) {
|
||||||
|
$entry['converted'] = false;
|
||||||
$entry['native_sum'] = $entry['sum'];
|
$entry['native_sum'] = $entry['sum'];
|
||||||
$entry['native_id'] = (string) $native->id;
|
$entry['native_id'] = (string) $native->id;
|
||||||
$entry['native_name'] = $native->name;
|
$entry['native_name'] = $native->name;
|
||||||
|
Loading…
Reference in New Issue
Block a user