Update code for piggy banks.

This commit is contained in:
James Cole
2024-12-01 06:48:15 +01:00
parent 21a6927279
commit f2fab5d4ee
5 changed files with 132 additions and 14 deletions

View File

@@ -163,7 +163,7 @@ class CorrectAmounts extends Command
private function fixRepetitions(): void
{
$set = PiggyBankRepetition::where('currentamount', '<', 0)->get();
$set = PiggyBankRepetition::where('current_amount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All piggy bank repetition amounts are positive.');
@@ -181,7 +181,7 @@ class CorrectAmounts extends Command
private function fixPiggyBanks(): void
{
$set = PiggyBank::where('targetamount', '<', 0)->get();
$set = PiggyBank::where('target_amount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All piggy bank amounts are positive.');