mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 10:39:28 +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();
|
||||
|
@@ -805,6 +805,7 @@ return [
|
||||
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
|
||||
'delete_piggy_bank' => 'Delete piggy bank ":name"',
|
||||
'cannot_add_amount_piggy' => 'Could not add :amount to ":name".',
|
||||
'cannot_remove_from_piggy' => 'Could not remove :amount from ":name".',
|
||||
'deleted_piggy_bank' => 'Deleted piggy bank ":name"',
|
||||
'added_amount_to_piggy' => 'Added :amount to ":name"',
|
||||
'removed_amount_from_piggy' => 'Removed :amount from ":name"',
|
||||
|
Reference in New Issue
Block a user