mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
This commit is contained in:
@@ -403,7 +403,7 @@ trait ModifiesPiggyBanks
|
|||||||
// if the piggy bank is now smaller than the current relevant rep,
|
// if the piggy bank is now smaller than the current relevant rep,
|
||||||
// remove money from the rep.
|
// remove money from the rep.
|
||||||
$repetition = $this->getRepetition($piggyBank);
|
$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);
|
$diff = bcsub($piggyBank->targetamount, $repetition->currentamount);
|
||||||
$this->createEvent($piggyBank, $diff);
|
$this->createEvent($piggyBank, $diff);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user