-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Objective: Build an automated foreign exchange revaluation system that recalculates asset/liability values based on real-time exchange rates and tracks unrealized gains/losses for compliance reporting.
Juggling Strategy: This will integrate with existing
Transaction
, Account, DebtAccount, and forexService to automatically revalue foreign currency balances and generate journal entries for FX gains/losses.
Key Files (8+):
models/FXRevaluation.js (New - Tracks revaluation history)
models/UnrealizedGainLoss.js (New - Stores unrealized FX positions)
services/revaluationEngine.js (New - Complex revaluation logic with rate snapshots)
services/fxGainLossService.js (New - Calculates realized vs unrealized gains)
routes/fx-revaluation.js (New - API for revaluation runs and reports)
public/fx-revaluation-dashboard.html (New - Interactive FX position tracker)
public/js/fx-revaluation-controller.js (New - Real-time rate updates and charts)
services/cronJobs.js
(Modified - Add daily FX revaluation cron)
server.js
(Modified - Register FX revaluation routes)
Complexity Drivers:
Real-time exchange rate integration
Multi-currency balance sheet revaluation
Unrealized vs realized gain/loss segregation
Historical rate tracking and audit trails
Automated journal entry generation
Compliance reporting (IFRS/GAAP standards)
Estimated Lines: ~1,200+ lines