mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 08:30:06 +00:00
Fix amount remove from piggy bug.
This commit is contained in:
@@ -324,7 +324,7 @@ class PiggyBankController extends Controller
|
||||
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
|
||||
if (bccomp($amount, $savedSoFar) === -1) {
|
||||
if (bccomp($amount, $savedSoFar) <= 0) {
|
||||
$repetition = $piggyBank->currentRelevantRep();
|
||||
$repetition->currentamount = bcsub($repetition->currentamount, $amount);
|
||||
$repetition->save();
|
||||
|
||||
Reference in New Issue
Block a user