From 74777a648c6e0248cb04760590264c93e2901017 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Feb 2023 07:44:43 +0100 Subject: [PATCH] Fix #6964 --- app/Jobs/CreateAutoBudgetLimits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }