mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 08:30:06 +00:00
Test fix for budgeting.
This commit is contained in:
@@ -52,9 +52,13 @@ class BudgetController extends BaseController
|
|||||||
Event::fire('limits.store', [$limit]);
|
Event::fire('limits.store', [$limit]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if ($amount > 0) {
|
||||||
$limit->amount = $amount;
|
$limit->amount = $amount;
|
||||||
$limit->save();
|
$limit->save();
|
||||||
Event::fire('limits.update', [$limit]);
|
Event::fire('limits.update', [$limit]);
|
||||||
|
} else {
|
||||||
|
$limit->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// try to find the limit repetition for this limit:
|
// try to find the limit repetition for this limit:
|
||||||
$repetition = $limit->limitrepetitions()->first();
|
$repetition = $limit->limitrepetitions()->first();
|
||||||
|
|||||||
Reference in New Issue
Block a user