End of month cleanup script (#1016)
~This is really just a proof of concept. I have no delusions that this might get included. I'm sure others might have a much cleaner implementation.~ I'm now delusional. Resolves https://github.com/actualbudget/actual/issues/508 Taking @youngcw 's advice, I changed the keyword to #cleanup for the end of month script to keep it separated. This screen video shows two categories that are sources of funds. At the end of the month, any excess in these funds can be redistributed to your highest priorities. Three categories are set as sinks, or recipients, of excess funds. #cleanup source -> Move 'extra' funds to To Budget #cleanup sink -> Fund category with To Budget funds, default weight = 1 #cleanup sink 2 -> Fund category with To Budget funds, weight = 2 Steps of the script: 1. Return funds from any category marked 'source' 2. Fund overspent categories fully if negative carryover is not allowed. 3. Fund each 'sink' category by the desired weight. I run through the script twice. Once to show that if there is a debt category that has a rolling negative balance, it will skip funding that category first and once to show how if a rolling negative balance isn't allowed, it will fund it before applying the weighted remainder. The example shown uses weights of 60, 20, and 20; therefore, the Debt category will receive 60% of the To Budget funds while General and Bills receive 20% each. The weights could have been changed to 6, 2, and 2 or 3 for the Debt category with no additional value for General and Bills to achieve the same result. 
Showing
- packages/desktop-client/src/components/budget/rollover/BudgetSummary.tsx 4 additions, 0 deletions...p-client/src/components/budget/rollover/BudgetSummary.tsx
- packages/loot-core/src/client/actions/queries.ts 7 additions, 0 deletionspackages/loot-core/src/client/actions/queries.ts
- packages/loot-core/src/server/budget/app.ts 5 additions, 0 deletionspackages/loot-core/src/server/budget/app.ts
- packages/loot-core/src/server/budget/cleanup-template.pegjs 15 additions, 0 deletionspackages/loot-core/src/server/budget/cleanup-template.pegjs
- packages/loot-core/src/server/budget/cleanup-template.ts 160 additions, 0 deletionspackages/loot-core/src/server/budget/cleanup-template.ts
- packages/loot-core/src/server/budget/types/handlers.d.ts 2 additions, 0 deletionspackages/loot-core/src/server/budget/types/handlers.d.ts
- upcoming-release-notes/1016.md 6 additions, 0 deletionsupcoming-release-notes/1016.md
Loading
Please register or sign in to comment