Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fixed a bug where the associated total amount for a bar would be too high.
James Colefd6e7fc1ab8a
diff --git a/app/lib/FireflyIII/Database/RepeatedExpense.php b/app/lib/FireflyIII/Database/RepeatedExpense.phpindex 89c019bacd..e09463b023 100644--- a/app/lib/FireflyIII/Database/RepeatedExpense.php+++ b/app/lib/FireflyIII/Database/RepeatedExpense.php@@ -95,9 +95,12 @@ class RepeatedExpense implements CUD, CommonDatabaseCalls, PiggybankInterface$amountPerBar = floatval($piggyBank->targetamount) / $parts;$cumulative = $amountPerBar;/** @var PiggybankPart $bar */- foreach ($bars as $bar) {+ foreach ($bars as $index => $bar) {$bar->setAmountPerBar($amountPerBar);$bar->setCumulativeAmount($cumulative);+ if($parts -1 == $index) {+ $bar->setCumulativeAmount($piggyBank->targetamount);+ }$reminder = $piggyBank->reminders()->where('startdate', $bar->getStartdate()->format('Y-m-d'))