Various code cleanup.

This commit is contained in:
James Cole
2017-06-05 11:12:50 +02:00
parent 64831b4c86
commit c4039b53e6
50 changed files with 274 additions and 217 deletions

View File

@@ -241,11 +241,11 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
public function getPiggyBanksWithAmount(): Collection
{
$currency = Amount::getDefaultCurrency();
$set = $this->getPiggyBanks();
$set = $this->getPiggyBanks();
foreach ($set as $piggy) {
$currentAmount = $piggy->currentRelevantRep()->currentamount ?? '0';
$piggy->name = $piggy->name . ' (' . Amount::formatAnything($currency, $currentAmount, false) . ')';
$piggy->name = $piggy->name . ' (' . Amount::formatAnything($currency, $currentAmount, false) . ')';
}
return $set;