Frontpage seems to be multi currency aware.

This commit is contained in:
James Cole
2024-12-24 16:56:31 +01:00
parent 7e2e49e129
commit 7b3a5c1afd
14 changed files with 211 additions and 108 deletions

View File

@@ -79,10 +79,6 @@ class General extends AbstractExtension
if (!$useNative) {
$strings[] = app('amount')->formatAnything($currency, $balance, false);
}
if($useNative) {
$strings[] =sprintf('(%s)', app('amount')->formatAnything($currency, $balance, false));
}
continue;
}
if ('native_balance' === $key) {
@@ -94,7 +90,7 @@ class General extends AbstractExtension
continue;
}
// for multi currency accounts.
if ($key !== $currency->code) {
if ($useNative && $key !== $default->code) {
$strings[] = app('amount')->formatAnything(TransactionCurrency::where('code', $key)->first(), $balance, false);
}
}