mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixed some math things.
This commit is contained in:
@@ -49,10 +49,12 @@ class UpdateJournalConnection
|
||||
if (is_null($repetition)) {
|
||||
return;
|
||||
}
|
||||
$amount = $journal->amount;
|
||||
$diff = $amount - $event->amount; // update current repetition
|
||||
bcscale(2);
|
||||
|
||||
$repetition->currentamount += $diff;
|
||||
$amount = $journal->amount;
|
||||
$diff = bcsub($amount, $event->amount); // update current repetition
|
||||
|
||||
$repetition->currentamount = bcadd($repetition->currentamount, $diff);
|
||||
$repetition->save();
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user