Set Exchange Gain/Loss and Write Off difference amount button to be displayed

Hello
Can anyone help please

Sales Invoice amount is 10000 USD + 1500 USD for Tax, hence total Sales Invoice amount is 11500 USD

Rate is at 36 USD , I,e 1 USD =36 MUR on 01 April 2020

Sales Invoice in MUR is 414,000 MUR

Payment is made for 8000USD and a difference amount of 32,000 MUR has been generated , whereby the paid amount 8000USD has been multiplied by exchange rate of 40 USD of the payment, hence paid amount is 320,000 MUR while total allocated amount MUR generated is 288,000 MUR, whereby 8000USD has been multiplied by exchange rate of 36, on the invoice, giving rise to a difference amount of 32,000 MUR and but neither the button Set Exchange Gain/Loss nor button Write Off difference amount did not appear . In this scenario, there has been a difference in both the exchange rate and paid amount between the invoice and payment, but the difference generated does not differentiate which amount goes into gain and loss account and which amount is write off.

On Payment, when the Paid Amount is set to 8000USD, the Allocated field is set to 8000USD as well, for the Sales Invoice in section Payment References, in order to avoid the outstanding amount of 3500USD, to be generated on the Invoice, the Allocated field is set to 11500USD, and this update the Total Allocated Amount MUR to 414,000 (whereby 11500 usd has been multiplied by exchange rate of 36 on the invoice) and this update the Difference amount (MUR) to 94,000 and the button Write Off Difference Amount is displayed, but out of the difference amount MUR of 94,000, we cannot differentiate between which amount goes into the gain and loss account and which amount goes into the Write Off account. The Set Exchange Gain/Loss button has not been displayed.

Please advise how to have both the Set Exchange Gain/Loss and Write Off difference amount button to be displayed and how to post the gain and loss amount in the gain and loss account and to how to post the difference between paid amount and invoice amount in the write off account
Same Currency USD has been used on both Sales Invoice and Payment