Restore old behavior

This commit is contained in:
James Cole
2024-03-17 12:00:28 +01:00
parent ab2772abe0
commit 3913fa5086
18 changed files with 51 additions and 51 deletions

View File

@@ -248,7 +248,7 @@ class PiggyBankTransformer extends AbstractTransformer
if (bccomp($currentAmount, $targetAmount) < 1) {
$now = today(config('app.timezone'));
$startDate = null !== $startDate && $startDate->gte($now) ? $startDate : $now;
$diffInMonths = $startDate->diffInMonths($targetDate, false);
$diffInMonths = (int) $startDate->diffInMonths($targetDate);
$remainingAmount = bcsub($targetAmount, $currentAmount);
// more than 1 month to go and still need money to save: