[PR #4799] [MERGED] [Feature] Store and use last synced account balances #103284

Closed
opened 2026-05-30 03:10:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4799
Author: @koonweee
Created: 4/13/2025
Status: Merged
Merged: 6/18/2025
Merged by: @matt-fidd

Base: masterHead: jt/store-and-use-synced-balance


📝 Commits (10+)

  • 46e67ec Update processBankSyncDownload to store synced balance in balance_current
  • 21a99cc Display last synced balance in MoreBalances
  • 3fca079 Add "Use last synced balance" to reconcile
  • 80a4118 Remove logs
  • 223808f Release notes
  • 9ca1ad9 Fix lint
  • b0065d5 Add missing useEffect dep
  • a1beaa0 Restore console.log and fix type for id
  • 0865176 Last synced total
  • 7004fa1 Fix lint

📊 Changes

3 files changed (+51 additions, -17 deletions)

View changed files

📝 packages/desktop-client/src/components/accounts/Reconcile.tsx (+34 -10)
📝 packages/loot-core/src/server/accounts/sync.ts (+11 -7)
upcoming-release-notes/4799.md (+6 -0)

📄 Description

Feature

This is a commonly requested feature to handle the case where the account balance synced from external sources (like SimpleFin) are different from the calculated account balance in Actual. See open issues: #2718 #4275

In this PR, we add:

  • Display the last synced balance in the account header
    CleanShot 2025-04-13 at 12 59 09
  • Button to "Use last synced balance" when reconciling balance
    CleanShot 2025-04-13 at 12 59 24

Code changes

  • Updated processBankSyncDownload
    • Previously, the function was attempting to update balance_current in the accounts schema with an array of account balances, resulting in the stored balance_current value being updated to null
    • In this change, we update balance_current with the startingBalance provided by SimpleFin etc instead, since that is a number representation of the current account balance
  • Updated MoreBalances component to render balance_current (when it exists on a given account)
  • Updated ReconcileMenu component to add "Use last synced balance" (when balance_currentexists on a given account)

🔄 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/4799 **Author:** [@koonweee](https://github.com/koonweee) **Created:** 4/13/2025 **Status:** ✅ Merged **Merged:** 6/18/2025 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `jt/store-and-use-synced-balance` --- ### 📝 Commits (10+) - [`46e67ec`](https://github.com/actualbudget/actual/commit/46e67ec50fdc38a71ae45a71d35b14e6be8ab1fd) Update `processBankSyncDownload` to store synced balance in `balance_current` - [`21a99cc`](https://github.com/actualbudget/actual/commit/21a99cc9436fb7fd0850ff22e3f179b5c60a78c7) Display last synced balance in `MoreBalances` - [`3fca079`](https://github.com/actualbudget/actual/commit/3fca079dcf78dbf38bb413b6f2a570ff03804bc2) Add "Use last synced balance" to reconcile - [`80a4118`](https://github.com/actualbudget/actual/commit/80a4118903042d2516ce4f0237bf9b173e44732d) Remove logs - [`223808f`](https://github.com/actualbudget/actual/commit/223808fba89eed87c4bbe762ad5bbec07d57db43) Release notes - [`9ca1ad9`](https://github.com/actualbudget/actual/commit/9ca1ad93c107583b11490ad87c8efa3fa1ebffcc) Fix lint - [`b0065d5`](https://github.com/actualbudget/actual/commit/b0065d5c95ca20e7442bd4782c09855160a703fb) Add missing useEffect dep - [`a1beaa0`](https://github.com/actualbudget/actual/commit/a1beaa0afbd1309ec6fd96911cf8a6c59c97cb6a) Restore console.log and fix type for id - [`0865176`](https://github.com/actualbudget/actual/commit/086517670458c30384ca963af6bff17b275881af) Last synced total - [`7004fa1`](https://github.com/actualbudget/actual/commit/7004fa1de7df07920acf6b22beb8f16e97d06e82) Fix lint ### 📊 Changes **3 files changed** (+51 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/accounts/Reconcile.tsx` (+34 -10) 📝 `packages/loot-core/src/server/accounts/sync.ts` (+11 -7) ➕ `upcoming-release-notes/4799.md` (+6 -0) </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> ## Feature This is a commonly requested feature to handle the case where the account balance synced from external sources (like SimpleFin) are different from the calculated account balance in Actual. See open issues: #2718 #4275 In this PR, we add: * Display the last synced balance in the account header ![CleanShot 2025-04-13 at 12 59 09](https://github.com/user-attachments/assets/b3842860-effc-4aae-b98e-69a890082616) * Button to "Use last synced balance" when reconciling balance ![CleanShot 2025-04-13 at 12 59 24](https://github.com/user-attachments/assets/ebe6cd65-9f69-453d-b690-622734e6eb3c) ## Code changes * Updated `processBankSyncDownload` * Previously, the function was attempting to update `balance_current` in the accounts schema with an array of account balances, resulting in the stored `balance_current` value being updated to null * In this change, we update `balance_current` with the `startingBalance` provided by SimpleFin etc instead, since that is a number representation of the current account balance * Updated `MoreBalances` component to render `balance_current` (when it exists on a given account) * Updated `ReconcileMenu` component to add "Use last synced balance" (when `balance_current`exists on a given account) --- <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-05-30 03:10:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#103284