mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-21 16:38:36 -06:00
This commit is contained in:
parent
b45aa85853
commit
cc7c6e02c5
@ -74,7 +74,16 @@ class General extends AbstractExtension
|
||||
|
||||
$strings = [];
|
||||
foreach ($info as $currencyId => $balance) {
|
||||
$strings[] = app('amount')->formatByCurrencyId($currencyId, $balance, false);
|
||||
if(0 === $currencyId) {
|
||||
// not good code but OK
|
||||
/** @var AccountRepositoryInterface $accountRepos */
|
||||
$accountRepos = app(AccountRepositoryInterface::class);
|
||||
$currency = $accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
|
||||
$strings[] = app('amount')->formatAnything($currency, $balance, false);
|
||||
}
|
||||
if(0 !== $currencyId) {
|
||||
$strings[] = app('amount')->formatByCurrencyId($currencyId, $balance, false);
|
||||
}
|
||||
}
|
||||
|
||||
return implode(', ', $strings);
|
||||
|
Loading…
Reference in New Issue
Block a user