Multi-Currency Accounting in ERP: Rates, FX Gains, IDR Rounding

How to design multi-currency accounting in a custom ERP: dual-currency journal lines, JISDOR rate pipelines, realized vs unrealized FX gains, and IDR rounding policy.