[PR #2126] [CLOSED] [WIP] Cashflow forecast #4136

Closed
opened 2026-02-28 20:52:02 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2126
Author: @mk-french
Created: 12/27/2023
Status: Closed

Base: masterHead: cashflow-forecast


📝 Commits (5)

  • 5d4a7b7 Cashflow forecast migrated from stale branch
  • 2008895 Cashflow forecast fixes
  • 463ba2d Cashflow forecast bug fixes and feature flag
  • e5fac42 Linting
  • 428f69e Fix single instance schedule bug

📊 Changes

10 files changed (+383 additions, -80 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/Header.jsx (+31 -7)
📝 packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx (+27 -2)
📝 packages/desktop-client/src/components/reports/reports/CashFlow.tsx (+54 -4)
📝 packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx (+240 -66)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+4 -0)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
📝 packages/desktop-client/src/style/themes/light.ts (+2 -0)
📝 packages/loot-core/src/server/schedules/app.ts (+17 -0)
📝 packages/loot-core/src/server/schedules/types/handlers.ts (+5 -0)
📝 packages/loot-core/src/types/prefs.d.ts (+2 -1)

📄 Description

Having a crack at implementing a form of cashflow forecasting as discussed in #187, #517, #716.

The concept is pretty simple - take all the schedules, get the occurrences of them up to the desired forecast date, check for transfers to create a balancing transaction (if required based on filtering), run them through the calculator for balances and show them as a seperate set of 'future' expense, income bars and balance line.

Would appreciate a good review and some feedback on:

  • the approach
  • alignment with conventions
  • plain old bad practices
  • is the 'experimental' flag masking enough?
  • anything unclear etc...

Some edge cases up for debate:

  • Should a transfer to an off budget account show as an expense/income? Currently in the historical cashflow they don't... So I've kept that convention.
  • Should a transfer to/from an account that is not in the graph filtering show up as an expense/income? Currently the change of balance is captured but it's not shown as a clear expense/income.

Thanks!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/2126 **Author:** [@mk-french](https://github.com/mk-french) **Created:** 12/27/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `cashflow-forecast` --- ### 📝 Commits (5) - [`5d4a7b7`](https://github.com/actualbudget/actual/commit/5d4a7b748f5ea9b7dddd9e9ac2bd3e7a5b29743f) Cashflow forecast migrated from stale branch - [`2008895`](https://github.com/actualbudget/actual/commit/2008895b37b6ee50f84df180268ed0994a6dea29) Cashflow forecast fixes - [`463ba2d`](https://github.com/actualbudget/actual/commit/463ba2df91d6914f04ce096e270eac4f9b8271af) Cashflow forecast bug fixes and feature flag - [`e5fac42`](https://github.com/actualbudget/actual/commit/e5fac42a8e0459478b220fbdcf47c3a441adf7fa) Linting - [`428f69e`](https://github.com/actualbudget/actual/commit/428f69e35b25561304e33a89389ffccc7a61c252) Fix single instance schedule bug ### 📊 Changes **10 files changed** (+383 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/Header.jsx` (+31 -7) 📝 `packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx` (+27 -2) 📝 `packages/desktop-client/src/components/reports/reports/CashFlow.tsx` (+54 -4) 📝 `packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx` (+240 -66) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+4 -0) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) 📝 `packages/desktop-client/src/style/themes/light.ts` (+2 -0) 📝 `packages/loot-core/src/server/schedules/app.ts` (+17 -0) 📝 `packages/loot-core/src/server/schedules/types/handlers.ts` (+5 -0) 📝 `packages/loot-core/src/types/prefs.d.ts` (+2 -1) </details> ### 📄 Description Having a crack at implementing a form of cashflow forecasting as discussed in #187, #517, #716. The concept is pretty simple - take all the schedules, get the occurrences of them up to the desired forecast date, check for transfers to create a balancing transaction (if required based on filtering), run them through the calculator for balances and show them as a seperate set of 'future' expense, income bars and balance line. Would appreciate a good review and some feedback on: - the approach - alignment with conventions - plain old bad practices - is the 'experimental' flag masking enough? - anything unclear etc... Some edge cases up for debate: - Should a transfer to an off budget account show as an expense/income? Currently in the historical cashflow they don't... So I've kept that convention. - Should a transfer to/from an account that is not in the graph filtering show up as an expense/income? Currently the change of balance is captured but it's not shown as a clear expense/income. Thanks! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:52:02 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#4136