Rename fields in piggy bank.

This commit is contained in:
James Cole
2024-11-30 15:57:11 +01:00
parent 9ad005e31f
commit 92190bbc54
8 changed files with 127 additions and 18 deletions

View File

@@ -105,7 +105,7 @@ class PiggyBankController extends Controller
/** @var PiggyBank $piggy */
foreach ($piggies as $piggy) {
$currency = $this->accountRepository->getAccountCurrency($piggy->account) ?? $defaultCurrency;
$currentAmount = $this->piggyRepository->getRepetition($piggy)->currentamount ?? '0';
$currentAmount = $this->piggyRepository->getRepetition($piggy)->current_amount ?? '0';
$objectGroup = $piggy->objectGroups()->first();
$response[] = [
'id' => (string)$piggy->id,