Skip to content

Commit

Permalink
fix #4445 (#4468)
Browse files Browse the repository at this point in the history
* change condition

* new message

* fix

* lint
  • Loading branch information
youngcw authored Feb 27, 2025
1 parent 398ada0 commit a7cde1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/loot-core/src/server/budget/cleanup-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ async function processCleanup(month: string): Promise<Notification> {
}

const budgetAvailable = await getSheetValue(sheetName, `to-budget`);
if (budgetAvailable <= 0) {
if (budgetAvailable < 0) {
warnings.push('Global: No funds are available to reallocate.');
}

Expand Down Expand Up @@ -351,6 +351,11 @@ async function processCleanup(month: string): Promise<Notification> {
message: 'Global: Funds not available:',
pre: warnings.join('\n\n'),
};
} else if (budgetAvailable === 0) {
return {
type: 'message',
message: 'All categories were up to date.',
};
} else {
return {
type: 'message',
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/4468.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [youngcw]
---

Remove warning on cleanup templates if budget is already "clean"

0 comments on commit a7cde1f

Please sign in to comment.