Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix https://github.com/firefly-iii/firefly-iii/issues/5958
James Cole789dba7cf98b
diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.phpindex 99f093f9a5..ff41f6fbdf 100644--- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php+++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php@@ -403,7 +403,7 @@ trait ModifiesPiggyBanks// if the piggy bank is now smaller than the current relevant rep,// remove money from the rep.$repetition = $this->getRepetition($piggyBank);- if (null !== $repetition && $repetition->currentamount > $piggyBank->targetamount) {+ if (null !== $repetition && $repetition->currentamount > $piggyBank->targetamount && 0.0 !== (float)$piggyBank->targetamount) {$diff = bcsub($piggyBank->targetamount, $repetition->currentamount);$this->createEvent($piggyBank, $diff);