Hi,
So, long story short, here’s the example and my setup
Setup:
- Company base currency: LYD
- Creditor account (as supplier): USD
- Company Account: USD
Process:
-
First Entry (Journal Entry):
100$ Credit from Creditor to Company Account with an exchange rate of (7) -
Second Entry (Payment Entry - Pay):
- Party Type: Supplier with his own account as the setup above.
- 100$ Paid from Company Account (USD) to the Creditor at an exchange rate of 9.
- The Journal Entry is referenced using the (Get Outstanding Invoices) button.
- When I save and submit the document, it creates an Exchange Gain/Loss Journal Entry with a value of 900 LYD when it should have been only 200 LYD
I mean, is this a bug or something? I tried to trace back the code that sets the exchange_gain_loss field value for the reference row in the references table for that outstanding invoice, but I couldn’t find anything.
Any help would be appreciated. ![]()