diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index cacf70be61..2c5581b762 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -501,7 +501,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface $piggyBank->name = $data['name']; $piggyBank->account_id = (int)$data['account_id']; $piggyBank->targetamount = $data['targetamount']; - $piggyBank->targetdate = $data['targetdate'] ?? $piggyBank->targetdate; + $piggyBank->targetdate = $data['targetdate']; $piggyBank->startdate = $data['startdate'] ?? $piggyBank->startdate; $piggyBank->save(); diff --git a/resources/views/list/piggy-banks.twig b/resources/views/list/piggy-banks.twig index 19a57d9ea7..5aa821077d 100644 --- a/resources/views/list/piggy-banks.twig +++ b/resources/views/list/piggy-banks.twig @@ -81,7 +81,7 @@ {% endif %} - {% if piggy.targetdate %} + {% if piggy.target_date %} {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_dp) }} {% endif %}