Files
sure/test/models
samuelcseto cb74856f61 Fix linked account balance currency mismatch (#566)
* Fix linked account balance currency mismatch

When linking accounts from providers (Lunchflow, SimpleFIN, Enable Banking),
the initial sync was creating balances before the correct currency was known.
This caused:
1. Opening anchor entry created with default currency (USD/EUR)
2. First sync created balances with wrong currency
3. Later syncs created balances with correct currency
4. Both currency balances existed, charts showed wrong (zero) values

Changes:
- Add `skip_initial_sync` parameter to `Account.create_and_sync`
- Skip initial sync for linked accounts (provider sync handles it)
- Add currency filter to ChartSeriesBuilder query to only fetch
  balances matching the account's current currency

* Add migration script and add tests

* Update schema.rb

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: sokie <sokysrm@gmail.com>
2026-01-08 18:23:34 +01:00
..
2025-12-07 18:11:34 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2026-01-07 16:16:01 +01:00
2025-11-23 20:43:55 +05:30
2025-11-11 19:51:07 +01:00
2026-01-08 15:20:14 +01:00
2025-11-11 19:51:07 +01:00
2025-05-24 17:58:17 -04:00