Rename fields for piggy bank

This commit is contained in:
James Cole
2024-11-30 16:02:30 +01:00
parent 92190bbc54
commit 21a6927279
15 changed files with 79 additions and 79 deletions

View File

@@ -173,7 +173,7 @@ class CorrectAmounts extends Command
/** @var PiggyBankRepetition $item */
foreach ($set as $item) {
$item->currentamount = app('steam')->positive($item->current_amount);
$item->current_amount = app('steam')->positive($item->current_amount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d piggy bank repetition amount(s).', $count));
@@ -191,7 +191,7 @@ class CorrectAmounts extends Command
/** @var PiggyBank $item */
foreach ($set as $item) {
$item->targetamount = app('steam')->positive($item->target_amount);
$item->target_amount = app('steam')->positive($item->target_amount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d piggy bank amount(s).', $count));

View File

@@ -128,7 +128,7 @@ class ApplyRules extends Command
$ruleEngine->addOperator(['type' => 'account_id', 'value' => $list]);
// add the date as a filter:
$ruleEngine->addOperator(['type' => 'date_after', 'value' => $this->startDate->format('Y-m-d')]);
$ruleEngine->addOperator(['type' => 'date_after', 'value' => $this->start_date->format('Y-m-d')]);
$ruleEngine->addOperator(['type' => 'date_before', 'value' => $this->endDate->format('Y-m-d')]);
// start running rules.
@@ -296,7 +296,7 @@ class ApplyRules extends Command
[$inputEnd, $inputStart] = [$inputStart, $inputEnd];
}
$this->startDate = $inputStart;
$this->start_date = $inputStart;
$this->endDate = $inputEnd;
}