Hello everyone,
I am facing an issue with a multi-currency Payment Entry in ERPNext.
Company currency is USD, and the Sales Invoice currency is EUR.
Sales Invoice:
Invoice Amount: 10,000 EUR
Exchange Rate: 1 EUR = 1.1658 USD
Grand Total / Outstanding: 11,658 USD
The Payment Entry is created from:
Sales Invoice > Create > Payment
At first, the invoice reference is correct:
Grand Total: 11,658 USD
Outstanding: 11,658 USD
Allocated: 11,658 USD
But when I change the Mode of Payment, ERPNext recalculates the amounts incorrectly:
Paid Amount: 15,844.27 USD
Received Amount: 13,590.90 EUR
Target Exchange Rate: 1.1658
It also adds a Forex Gain/Loss row with:
Amount: -15,844.27 USD
Expected result should remain:
Paid Amount: 11,658 USD
Received Amount: 10,000 EUR
Allocated Amount: 11,658 USD
Difference Amount: 0
Is this expected behavior because of the selected Mode of Payment account/currency, or could it be a bug in the recalculation after changing Mode of Payment?
Any guidance on the correct setup would be appreciated.