Skip to content

Core: Historical Currency Revaluation Engine Overhaul #630

@SatyamPandey-07

Description

@SatyamPandey-07

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.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions