Skip to content

Firefly III: a personal finances manager

Fix #7557

James Cole13d3b863097a
diff --git a/app/Handlers/Events/Model/BudgetLimitHandler.php b/app/Handlers/Events/Model/BudgetLimitHandler.php
index 235c0c9c19..df70b523cc 100644
--- a/app/Handlers/Events/Model/BudgetLimitHandler.php
+++ b/app/Handlers/Events/Model/BudgetLimitHandler.php
@@ -181,7 +181,7 @@ class BudgetLimitHandler
$start = app('navigation')->startOfPeriod($budgetLimit->start_date, $viewRange);
$end = app('navigation')->startOfPeriod($budgetLimit->end_date, $viewRange);
$end = app('navigation')->endOfPeriod($end, $viewRange);
- $budget = Budget::withTrashed()->find($budgetLimit->budget_id);
+ $budget = Budget::find($budgetLimit->budget_id);
if(null === $budget) {
Log::warning('Budget is null, cannot continue.');
$budgetLimit->forceDelete();
@@ -210,6 +210,7 @@ class BudgetLimitHandler
'end_date',
$currentEnd->format('Y-m-d')
)->where('transaction_currency_id', $budgetLimit->transaction_currency_id)->first();
+
if (null !== $availableBudget) {
Log::debug('Found 1 AB, will update.');
$this->calculateAmount($availableBudget);