Charged in USD, pay in RM from Rp, how to?

My supplier in invoice charged us in USD, but we will pay them in Malaysian Ringgit from Indonesian Rupiah. How do you enter these data?

USD100 x RM4 = RM400
RM400 x Rp3.200 = Rp1.280.000

Your post is not clear. How do you get 3 currencies involved? Your supplier is in one currency. You have a base currency. You might have bank or cash accounts in other currencies. But you can’t use 3 in one transaction all at the same time. We need more details about the transaction, not the exchange rates.

The invoice is in USD. However it is a Malaysian company, we have to pay them according to the rate of USD in RM. Our base currency is Rupiah. We pay in Rupiah against the RM.

You are making this more complex than it is. You are paying a USD invoice in Rupiah. Enter the optional base currency amount when paying the invoice. It does not matter whether you have calculated that between two currencies or a chain of ten currencies. You are telling the program that a payment of X Rupiah satisfies an account payable of Y USD.

From what l understand invoice from supplier is in USD. I would suggest that when capturing the invoice you convert the amount to an equivalent of your presentation currency which would likely be Indonesian Rupiah at prevailing exchange rate on the invoice date.
However, because exchange rates are not constant to settle the supplier invoice on a future date we have to purchase an equivalent amount of USDs at the prevailing exchange rate at that date.
This will give rise to a profit or loss on foreign exchanges rates which will be a profit or loss to you.
For example

Supplier invoices us on 1 June for 1000USD. The exchange rate at that date was 1USD to 2IR. IR is our presentation currency.
The following will be the Journal
DR Expense (1000*2) 2 000.00
CR Supplier Account. 2 000.00

When we made payment the exchange rate was 1USD to 2.5IR
DR Supplier Account 2 000.00
DR Profit/loss on exchange rate 500.00
CR Bank. 2 500.00

Direct conversion is straightforward Rp to USD. However, the company wanted to be paid according to the rate of RM to USD. The rates between Rp and RM are different against the USD.

That is the first l hear of such. Why did the supplier issue you with a invoice denominated in USD then? I cannot figure out why they would want that cause by denominating the invoice in USD they have already transferred the risk of the exchange rate movement between the USD and Rp to you. Should they have wanted you to pay a certain amount in RM then they should have just invoiced you in RM. The accounting would have remained the same as my previous post for you.

Do a conversion between RM and USD first.
After you determine the required RM to pay, do a conversion between the RM and Rp to determine how many Rps you need to get the required RM for the payment. So in your accounts, you will just enter the Rp amount and the USD equivalent.