diff --git a/packages/loot-core/src/server/budget/goaltemplates.ts b/packages/loot-core/src/server/budget/goaltemplates.ts index 6ed7cd47c849fdb67a7ba847e62ceb957659b35a..06a5ef21dffe2718cd9b42f81f09246a543e4e0c 100644 --- a/packages/loot-core/src/server/budget/goaltemplates.ts +++ b/packages/loot-core/src/server/budget/goaltemplates.ts @@ -714,8 +714,8 @@ async function applyCategoryTemplate( if (limit != null) { if (hold && balance > limit) { to_budget = 0; - } else if (to_budget + last_month_balance > limit) { - to_budget = limit - last_month_balance; + } else if (to_budget + balance > limit) { + to_budget = limit - balance; } } if ( diff --git a/upcoming-release-notes/1448.md b/upcoming-release-notes/1448.md new file mode 100644 index 0000000000000000000000000000000000000000..c3b52295392d73dcb2da2b849171d8b37134de6a --- /dev/null +++ b/upcoming-release-notes/1448.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [shall0pass] +--- + +Goals: Fix 'up to' calculation to include current month spending \ No newline at end of file