mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Make sure amounts are formatted, and fixed some issues.
This commit is contained in:
@@ -240,10 +240,12 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*/
|
||||
public function getPiggyBanksWithAmount(): Collection
|
||||
{
|
||||
$currency = Amount::getDefaultCurrency();
|
||||
$set = $this->getPiggyBanks();
|
||||
foreach ($set as $piggy) {
|
||||
$currentAmount = $piggy->currentRelevantRep()->currentamount ?? '0';
|
||||
$piggy->name = $piggy->name . ' (' . Amount::format($currentAmount, false) . ')';
|
||||
|
||||
$piggy->name = $piggy->name . ' (' . Amount::formatAnything($currency, $currentAmount, false) . ')';
|
||||
}
|
||||
|
||||
return $set;
|
||||
|
Reference in New Issue
Block a user