-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Objective: Build a persistent exchange rate tracking system that retroactively updates transaction values when exchange rates are corrected or "Net Worth Snapshots" are re-run.
Files Involved (~7):
services/revaluationService.js
: Rewrite to support historical point-of-sale vs report-time valuation.
services/forexService.js
: Add complexity for historical rate fetching and cache-filling.
models/Transaction.js
: Update to store historical rate metadata.
routes/transactions.js
: Changes to how totals are displayed vs stored.
models/NetWorthSnapshot.js
: Refactor how snapshot buckets are calculated.
services/batchProcessor.js: (New) Logic to re-calculate thousands of transactions in batches.
utils/currencyMath.js: (New) Dedicated utility for precision-based currency transformations.
Code Volume: Significant. This "juggling" requires changing how every single transaction is read and modified by the revaluation service.