Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bank sync/correct sorting #118

Merged
merged 2 commits into from
Mar 1, 2025
Merged

Bank sync/correct sorting #118

merged 2 commits into from
Mar 1, 2025

Conversation

bvanelli
Copy link
Owner

@bvanelli bvanelli commented Mar 1, 2025

Fixes the incorrect sorting of the Actual transactions since the resolution of actualbudget/actual-server#556

Since the server and frontend code have been moved together, all the bank sync validations are now being done on backend, to allow support for more integrations. This means actualpy has to handle less logic when evaluating the bank sync.

This PR solves a couple of issues:

  • Correctly calculates the starting balance for goCardless integration
  • Correctly sorts the transactions by starting with the "Starting Balance", then consuming all sync transactions in reverse
  • Correctly set the sort_order field by multiplying it by 1000 to convert to milliseconds
  • Added Accounts.last_sync and Transactions.raw_synced_data. Nothing has been implemented for them

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.94%. Comparing base (ea640f2) to head (e4d18e8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   97.93%   97.94%           
=======================================
  Files          16       16           
  Lines        2329     2336    +7     
=======================================
+ Hits         2281     2288    +7     
  Misses         48       48           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bvanelli bvanelli merged commit 6e9c3d1 into main Mar 1, 2025
9 checks passed
@bvanelli bvanelli deleted the bank-sync/correct-sorting branch March 1, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant