Exchange rate gain or loss

How to enter exchange rate Gain or Loss in Sales

Check: https://docs.erpnext.com/docs/user/manual/en/accounts/articles/manage-foreign-exchange-difference

I have posted the loss amount like this, but the payment status remains ‘over due’ in the sales invoice