This commit is contained in:
James Cole
2025-02-19 06:37:40 +01:00
parent 13fc7f0d8d
commit 30007b05cb

View File

@@ -233,8 +233,8 @@ trait ModifiesPiggyBanks
$difference = bcsub($piggyBank->target_amount, $currentAmount);
// an amount will be removed, create "negative" event:
Log::debug(sprintf('ChangedAmount: is triggered with difference "%s"', $difference));
event(new ChangedAmount($piggyBank, $difference, null, null));
// Log::debug(sprintf('ChangedAmount: is triggered with difference "%s"', $difference));
// event(new ChangedAmount($piggyBank, $difference, null, null));
// question is, from which account(s) to remove the difference?
// solution: just start from the top until there is no more money left to remove.