When a Customer / Vendor transaction is posted with a currency that differs from the Accounting / Reporting currency in D365 Finance, it needs to be revalued to account for fluctuations in exchange rates. To account for the unrealized / realized gain / loss amount, users must run the AR / AP Foreign Currency Revaluation.
What’s the Difference between Unrealized Gain / Loss and Realized Gain / Loss?
Unrealized Gain / Loss is the exchange rate difference between the invoice date and the revaluation date for any OPEN vendor invoices. These gains and losses calculated are “unrealized” because they potentially could still change in value due to fluctuations in exchange rates as the transactions are still open and not fully settled yet.
Realized Gain / Loss is the exchange rate difference between the invoice date and the payment settlement date, and that is the final revaluation that will be calculated for this particular vendor invoice if this payment fully settles the open invoice amount. These gains and losses calculated has been “realized” because the transaction is now completed and the actual financial impact is recorded in the financial statements.
Example of How Unrealized / Realized Gain / Loss is Calculated for Accounts Payable
Before running the AP / AR Foreign Currency Revaluation in D365 Finance, the Main Accounts for unrealized / realized gain / loss must be set up in the Chart of Accounts and these Main Accounts will be defined in the Ledger setup page under the “Accounts for currency revaluation” section (General ledger > Ledger setup > Ledger).

Setup exchange rates for USD-CAD on the Currency exchange rates page (General ledger > Currencies > Currency exchange rates)


Navigate to Accounts payable > Invoices > Invoice Journal and create 2 invoices – 1 for Nov 2nd and 1 for Nov 16th.
Invoice 110224:
| Event | Date | CAD | USD | Exchange Rate |
|---|---|---|---|---|
| Created | 11/2/2024 | 500.00 | 359.48 | 1.3909 |
Invoice 111624:
| Event | Date | CAD | USD | Exchange Rate |
|---|---|---|---|---|
| Created | 11/16/2024 | 200.00 | 142.23 | 1.4062 |

Run Foreign Currency Revaluation for 11/30/2024 (Accounts payable > Periodic tasks > Foreign currency revaluation).

Invoice 110224:
| Event | Date | CAD | USD | Exchange Rate | Revaluation Difference from Original Invoice Value |
|---|---|---|---|---|---|
| Created | 11/2/2024 | 500.00 | 359.48 | 1.3909 | |
| Revaluation | 11/30/2024 | 500.00 | 357.06 | 1.4003 | 359.48 – 357.06 = 2.42 |
Invoice 111624:
| Event | Date | CAD | USD | Exchange Rate | Revaluation Difference from Original Invoice Value |
|---|---|---|---|---|---|
| Created | 11/16/2024 | 200.00 | 142.23 | 1.4062 | |
| Revaluation | 11/30/2024 | 200.00 | 142.83 | 1.4003 | 142.23 – 142.83 = (0.60) |
D365 Finance books the $2.42 unrealized gain for Invoice 110224, and books the $0.60 unrealized loss for Invoice 111624.

On 12/18/2024, a payment is issued to fully settle Invoice 110224 (Accounts payable > Payments > Vendor payment journal).

Invoice 110224:
| Event | Date | CAD | USD | Exchange Rate | Revaluation Difference from Original Invoice Value |
|---|---|---|---|---|---|
| Created | 11/2/2024 | 500.00 | 359.48 | 1.3909 | |
| Revaluation | 11/30/2024 | 500.00 | 357.06 | 1.4003 | 359.48 – 357.06 = 2.42 |
| Payment | 12/18/2024 | 500.00 | 351.24 | 1.4235 | 359.48 – 351.24 = 8.24 |
D365 reverses the most recent revaluation amount of $2.42 unrealized gain on the day the payment was settled and book the $8.24 realized gain for Invoice 110224.

Run Foreign Currency Revaluation for 12/31/2024 (Accounts payable > Periodic tasks > Foreign currency revaluation).
Invoice 110224 will not be part of the revaluation anymore since it has been fully settled and has recorded the realized gain.
Invoice 111624:
| Event | Date | CAD | USD | Exchange Rate | Revaluation Difference from Original Invoice Value |
|---|---|---|---|---|---|
| Created | 11/16/2024 | 200.00 | 142.23 | 1.4062 | |
| Revaluation | 11/30/2024 | 200.00 | 142.83 | 1.4003 | 142.23 – 142.83 = (0.60) |
| Revaluation | 12/31/2024 | 200.00 | 139.37 | 1.4350 | 142.23 – 139.37 = 2.86 |
D365 reverses the most recent revaluation amount of $0.60 unrealized loss and book the $2.86 unrealized gain for Invoice 111624.

Since its year-end, the year-end close will be performed. As setup on the year-end close template, the P&L accounts (400000-999999) will be closed and rolled into the Retained Earnings account (300160). However, since there are open invoices that are have not been settled yet, the Unrealized Gain / Loss amount stays in the GL account as Opening balance and will not be rolled into Retained Earnings account.
Before year-end close:

After year-end close:

Run Foreign Currency Revaluation for 1/31/2025 (Accounts payable > Periodic tasks > Foreign currency revaluation).
Invoice 111624:
| Event | Date | CAD | USD | Exchange Rate | Revaluation Difference from Original Invoice Value |
|---|---|---|---|---|---|
| Created | 11/16/2024 | 200.00 | 142.23 | 1.4062 | |
| Revaluation | 11/30/2024 | 200.00 | 142.83 | 1.4003 | 142.23 – 142.83 = (0.60) |
| Revaluation | 12/31/2024 | 200.00 | 139.37 | 1.4350 | 142.23 – 139.37 = 2.86 |
| Revaluation | 1/31/2025 | 200.00 | 138.09 | 1.4484 | 142.23 – 138.09 = 4.14 |
D365 reverses the most recent revaluation amount of $2.86 unrealized gain and book the $4.14 unrealized gain for Invoice 111624.

On 2/17/2025, a payment is issued to fully settle Invoice 111624 (Accounts payable > Payments > Vendor payment journal).

Invoice 111624:
| Event | Date | CAD | USD | Exchange Rate | Revaluation Difference from Original Invoice Value |
|---|---|---|---|---|---|
| Created | 11/16/2024 | 200.00 | 142.23 | 1.4062 | |
| Revaluation | 11/30/2024 | 200.00 | 142.83 | 1.4003 | 142.23 – 142.83 = (0.60) |
| Revaluation | 12/31/2024 | 200.00 | 139.37 | 1.4350 | 142.23 – 139.37 = 2.86 |
| Revaluation | 1/31/2025 | 200.00 | 138.09 | 1.4484 | 142.23 – 138.09 = 4.14 |
| Revaluation | 2/17/2025 | 200.00 | 140.99 | 1.4185 | 142.23 – 1410.99 = 1.24 |
D365 reverses the most recent revaluation amount of $4.14 unrealized gain on the day the payment was settled and book the $1.24 realized gain for Invoice 111624.

Run Foreign Currency Revaluation for 2/28/2025 (Accounts payable > Periodic tasks > Foreign currency revaluation).
Invoice 110224 will not be part of the revaluation anymore since it has been fully settled and has recorded the realized gain.



Leave a comment