Exchange rate in payment Entry

Hi
Can Anyone help me please
Scenario 1:

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

Upon processing payment and the Exchange rate is changed to 45 USD either manually or through creating Currency Exchange list setup, the Set Exchange Gain/Loss button does not appear to calculate the Exchange Gain/Loss amount. how to post the gain and loss amount

Scenario 2

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 processed at an Exchange rate of 40 USD, for an amount of 11500 USD, hence Paid Amount MUR is 460,000, as per Rate of 40 USD, Received Amount is 414,000 MUR as per invoice, full payment is made, however Total Allocated Amount is 11500 USD and Total Allocated Amount MUR is 414,000, the difference between Paid Amount of 460,000 and Total Allocated amount of 414,000 has not been generated and neither the button “WriteOff Difference Amount” nor the button Set Exchange Gain/Loss appear and also after posting the payment only the amount of 414,000MUR went into g/L entries, the difference between Paid Amount and Total Allocated amount, which is 46,000 MUR did not to g/L entries. Please advise how to post the unposted amount of 46,000 MUR

Scenario 3

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 126,000 MUR has been generated , whereby the paid amount 8000USD has been multiplied by exchange rate of the invoice, i.e 36 usd, instead of 40 USD which is being used on the payment, thereby total allocated amount MUR generated is 288,000 MUR, hence difference between Received Amount MUR (414,000) and the total allocated amount MUR genarated is 288,000, give rise to a difference amount of 126,000 MUR and this cause the button Set Exchange Gain/Loss to appear . In this scenario, there has been a difference in both the exchange rate and paid amount between the invoice and payment, and both the difference amount and the gain and loss amount have not been generated separately so that we can differentiate which amount goes in gain and loss account and which amount is treated as a difference to writeoff and also only the button Set Exchange Gain/Loss has been displayed, the button Write Off difference amount has not been displayed. Though Paid amount was 320,000 MUR, which is paid amount of 8000USD multiply by the exchange rate of 40 USD on the payment, it is not found that the paid amount of 8000USD has been involved in any calculation or posting.

And the Sales Invoice still appear to have an outstanding amount of 3500USD not paid yet, whereas the 3500 USD should have been posted in a WRITEOFF Difference account but the Write Off Difference Amount button was not displayed

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 t he outstanding amount of 3500USD, to be generated on the Invoice, the Allocated field is set to 11500USD, however, this cause the button Set Exchange Gain/Loss to disappear and neither the difference amount to write off has been generated nor the gain and loss amount has been generated.

Please advise of to have the difference amount posted to t he Write Off difference account and the gain and loss posted to the gain and loss account.