[PR #4890] [CLOSED] [WIP] feat: add currency to budget file #5647

Closed
opened 2026-02-28 21:16:00 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4890
Author: @misu-dev
Created: 4/26/2025
Status: Closed

Base: masterHead: feat/file-currency


📝 Commits (10+)

  • cfc6fee feat(budget): add currency to budget
  • bf6c8ca feat(template): add currency to template and goals
  • d578275 feat(account): add currency to account and transaction
  • fa90a5c feat(report): add currency to networth
  • 7f308b7 feat(report): add currency to cashflow
  • 07d6c9c feat(report): add currency to spending
  • 7611d84 feat(report): add currency to summary
  • 3d9d9bc feat(report): add currency to calendar
  • 2f1a0d8 feat(report): add currency to custom
  • c1c1749 feat(schedules): add currency to schedules

📊 Changes

112 files changed (+1262 additions, -700 deletions)

View changed files

📝 packages/component-library/src/Input.tsx (+7 -10)
📝 packages/desktop-client/e2e/budget.mobile.test.ts (+14 -4)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-4-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-5-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-6-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+7 -0)
📝 packages/desktop-client/src/components/accounts/Reconcile.tsx (+13 -18)
📝 packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx (+5 -3)
📝 packages/desktop-client/src/components/budget/envelope/BalanceMovementMenu.tsx (+5 -0)
📝 packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx (+7 -10)
📝 packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx (+7 -15)
📝 packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx (+9 -10)
📝 packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx (+3 -0)
📝 packages/desktop-client/src/components/budget/goals/editor/SimpleAutomationReadOnly.tsx (+5 -2)

...and 80 more files

📄 Description

This Feature adds the possibility to have a currency for a budget file. In the settings there is a new option to select a currency. Default is None (nothing changes).

image
image
image

After selecting a currency with its settings, all numbers will be displayed in the selected currency. Nothing will change in the data itself.

Possible currencies:

  • I selected the top 10 currencies (by Perplexity), which are AUD, CAD, CHF, CNY, EUR, GBP, HKD, JPY, SGD and USD
  • other currencies can be added in the packages/loot-core/src/shared/currencies.ts File
  • if a new currency is added which has more than 2 decimal places, the MAX_SAFE_NUMBER in packages/loot-core/src/shared/util.ts has to be adjusted

Behavior on currency change:

  • If you select a currency with the same number of decimal places, nothing should change
  • If you select JPY your numbers will also change. The reason is that the numerical values are stored as integers. As JPY has 0 decimal places, your numbers will be off

This PR is currently way too big to review. So I'll create different PRs to make the changes more managable. I also put the feature into the experimental feature flag.
This PR will show the final result, with most features implemented.

The following PRs are currently in work:

This PR is a small step for Feature-Request #1132 and should close https://github.com/actualbudget/actual/issues/1589


🔄 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/4890 **Author:** [@misu-dev](https://github.com/misu-dev) **Created:** 4/26/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/file-currency` --- ### 📝 Commits (10+) - [`cfc6fee`](https://github.com/actualbudget/actual/commit/cfc6fee6be916b197265d639e8c1f65dbb76065d) feat(budget): add currency to budget - [`bf6c8ca`](https://github.com/actualbudget/actual/commit/bf6c8ca07d9e221f3f838736acf3c29d839cf296) feat(template): add currency to template and goals - [`d578275`](https://github.com/actualbudget/actual/commit/d578275f15dcfe5838b8bfd2d4112d10d21bb4cd) feat(account): add currency to account and transaction - [`fa90a5c`](https://github.com/actualbudget/actual/commit/fa90a5c6482337f0bb2f791e1e8447c6694a430e) feat(report): add currency to networth - [`7f308b7`](https://github.com/actualbudget/actual/commit/7f308b7831297568ac1f86da44cb35f7eb4ecfc0) feat(report): add currency to cashflow - [`07d6c9c`](https://github.com/actualbudget/actual/commit/07d6c9c82f985dfd00559a397acc6a7872fa48e7) feat(report): add currency to spending - [`7611d84`](https://github.com/actualbudget/actual/commit/7611d8438182c0624f1332bc2cef13566721fcfd) feat(report): add currency to summary - [`3d9d9bc`](https://github.com/actualbudget/actual/commit/3d9d9bc8b635afe902e8465337299037f34b94cb) feat(report): add currency to calendar - [`2f1a0d8`](https://github.com/actualbudget/actual/commit/2f1a0d8da4998aadd2f881c6feb0ba8951fda98b) feat(report): add currency to custom - [`c1c1749`](https://github.com/actualbudget/actual/commit/c1c1749e6dcf7c881f5d9bae9dec2825fdda0dc3) feat(schedules): add currency to schedules ### 📊 Changes **112 files changed** (+1262 additions, -700 deletions) <details> <summary>View changed files</summary> 📝 `packages/component-library/src/Input.tsx` (+7 -10) 📝 `packages/desktop-client/e2e/budget.mobile.test.ts` (+14 -4) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-4-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-5-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.mobile.test.ts-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-6-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+7 -0) 📝 `packages/desktop-client/src/components/accounts/Reconcile.tsx` (+13 -18) 📝 `packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx` (+5 -3) 📝 `packages/desktop-client/src/components/budget/envelope/BalanceMovementMenu.tsx` (+5 -0) 📝 `packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx` (+7 -10) 📝 `packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx` (+7 -15) 📝 `packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx` (+9 -10) 📝 `packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx` (+3 -0) 📝 `packages/desktop-client/src/components/budget/goals/editor/SimpleAutomationReadOnly.tsx` (+5 -2) _...and 80 more files_ </details> ### 📄 Description This Feature adds the possibility to have a currency for a budget file. In the settings there is a new option to select a currency. Default is None (nothing changes). ![image](https://github.com/user-attachments/assets/baf37eec-5415-4f70-a721-1b08fa441002) ![image](https://github.com/user-attachments/assets/e8afa327-6eac-452a-8aaf-6645e53eb0b4) ![image](https://github.com/user-attachments/assets/32b81ac7-a049-4ddf-aea9-dbf390cd9870) After selecting a currency with its settings, all numbers will be displayed in the selected currency. Nothing will change in the data itself. Possible currencies: - I selected the top 10 currencies (by Perplexity), which are AUD, CAD, CHF, CNY, EUR, GBP, HKD, JPY, SGD and USD - other currencies can be added in the `packages/loot-core/src/shared/currencies.ts` File - if a new currency is added which has more than 2 decimal places, the MAX_SAFE_NUMBER in `packages/loot-core/src/shared/util.ts` has to be adjusted Behavior on currency change: - If you select a currency with the same number of decimal places, nothing should change - If you select JPY your numbers will also change. The reason is that the numerical values are stored as integers. As JPY has 0 decimal places, your numbers will be off This PR is currently way too big to review. So I'll create different PRs to make the changes more managable. I also put the feature into the experimental feature flag. This PR will show the final result, with most features implemented. The following PRs are currently in work: - [x] https://github.com/actualbudget/actual/pull/5167 - [ ] https://github.com/actualbudget/actual/pull/5283 This PR is a small step for Feature-Request #1132 and should close https://github.com/actualbudget/actual/issues/1589 --- <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 21:16:00 -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#5647