Accounts receivable / accounts payable should be in currency, in which those are billed.
If you pay in another currency, simply make payment from bank account that is opened in that currency, if bank currency mismatch customer/supplier currency, you will be prompted to put amount in original currency. That amount will be deducted form invoice.
Say you have a supplier A, who issued you invoice for USD 1,000. You’ve created Supplier A, added invoice for USD 1,000.
Then you are paying from EUR bank account.
You’ve created said EUR account, and when you post payment you will have to input amount paid, say EUR 900, this is equal to your bank statement amount. And as Supplier A denominated in USD and you’ve paid in EUR, you will have an optional field on payment screen. Enter there USD 1,000.
After that you will have: (a) paid invoice, (b) correct bank balance, © gain/loss on FX in PL.