Suppose that when you buy goods, you agree with the supplier to pay one month later, instead of paying at that time, and you need to settle foreign exchange after one month, then exchange gains and losses will occur:
Borrow: Goods in stock 100
Loan: accounts payable 100
Assuming that the exchange rate at the time of payment is 1 USD =9 yuan RMB, or payment is not made until the end of the month, and the exchange rate at the end of the month is 1 USD =9 yuan RMB, there will be exchange gains and losses:
Debit: financial expenses-1010 * (9-10)
Loan: accounts payable-10