This commit is contained in:
James Cole
2026-02-07 06:32:11 +01:00
parent 256262b2ba
commit 6d4aca54de
4 changed files with 22 additions and 20 deletions

View File

@@ -194,7 +194,7 @@ class ShowController extends Controller
foreach ($group['transactions'] as $transaction) {
// add normal amount:
$symbol = $transaction['currency_symbol'];
$amounts[$symbol] ??= ['amount' => '0', 'symbol' => $symbol, 'decimal_places' => $transaction['currency_decimal_places']];
$amounts[$symbol] ??= ['amount' => '0', 'symbol' => $symbol, 'decimal_places' => $transaction['currency_decimal_places'],'approximate' =>false];
$amounts[$symbol]['amount'] = bcadd($amounts[$symbol]['amount'], (string) $transaction['amount']);
// add foreign amount:
@@ -207,6 +207,7 @@ class ShowController extends Controller
$foreignSymbol = $transaction['foreign_currency_symbol'];
$amounts[$foreignSymbol] ??= [
'amount' => '0',
'approximate' =>false,
'symbol' => $foreignSymbol,
'decimal_places' => $transaction['foreign_currency_decimal_places'],
];
@@ -222,6 +223,7 @@ class ShowController extends Controller
$primarySymbol = $this->primaryCurrency->symbol;
$amounts[$primarySymbol] ??= [
'amount' => '0',
'approximate' =>true,
'symbol' => $this->primaryCurrency->symbol,
'decimal_places' => $this->primaryCurrency->decimal_places,
];