overpayment: book overpayment_amount to Realized FX gain/loss in GL
#9070 (closed) added the ability to overpay supplier invoices in a foreign currency or receive overpayment for customer invoices in a foreign currency
The solution provided creates three move lines, example for supplier invoice:
A/P account: amount of the debt A/P account: amount of the remainder (overpaid) Bank account: amount of the payment (sum of the other two lines)
The remaineder amount is a realized FX gain (revenue) for the customer invoice or a realized FX loss (expense) for a supplier invoice. For a supplier invoice, the three move lines should be:
A/P account: amount of the debt FX loss account: amount of the remainder (overpaid) Bank account: amount of the payment (sum of the other two lines)