* change condition

* new message

* fix

* lint
This commit is contained in:
youngcw
2025-02-27 10:06:08 -07:00
committed by GitHub
parent 398ada0afd
commit a7cde1f90d
2 changed files with 12 additions and 1 deletions

View File

@@ -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.');
}
@@ -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',

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [youngcw]
---
Remove warning on cleanup templates if budget is already "clean"