A payment of an invoice in another currency takes out of Accounts receivable the share of the invoice it pays, at the amount entered for the invoice. When the payment was worth more or less, the difference goes to the new Exchange gains and losses account. Before, the difference stayed in Accounts receivable.
Payments already added are posted again with the difference the next time Accounting is opened. On the cash basis, Profit and Loss counts the difference when the payment is received.