mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Restore old behavior
This commit is contained in:
@@ -301,7 +301,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
if (null !== $piggyBank->targetdate && $repetition->currentamount < $piggyBank->targetamount) {
|
||||
$now = today(config('app.timezone'));
|
||||
$startDate = null !== $piggyBank->startdate && $piggyBank->startdate->gte($now) ? $piggyBank->startdate : $now;
|
||||
$diffInMonths = $startDate->diffInMonths($piggyBank->targetdate, false);
|
||||
$diffInMonths = (int) $startDate->diffInMonths($piggyBank->targetdate);
|
||||
$remainingAmount = bcsub($piggyBank->targetamount, $repetition->currentamount);
|
||||
|
||||
// more than 1 month to go and still need money to save:
|
||||
|
Reference in New Issue
Block a user