Skip to content

Firefly III: a personal finances manager

Fix #6964

James Cole74777a648c6e
diff --git a/app/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php
index daba57ce75..e439113929 100644
--- a/app/Jobs/CreateAutoBudgetLimits.php
+++ b/app/Jobs/CreateAutoBudgetLimits.php
@@ -297,7 +297,7 @@ class CreateAutoBudgetLimits implements ShouldQueue
Log::info(sprintf('The amount left is negative, so it will be reset to %s.', $totalAmount));
}
if (1 !== bccomp('0', $budgetLeft)) {
- $totalAmount = bcadd($budgetLeft, $budgetLimit->amount);
+ $totalAmount = bcadd($budgetLeft, $totalAmount);
Log::info(sprintf('The amount left is positive, so the new amount will be %s.', $totalAmount));
}