Black market Exchange rate For currency

Hi ,
in my country we can’t withdrew dollar from banks right now , so we sell it with a check to (black market exchange supplier ) and we loose in the dollar value to have cash in hands .
for example if we have 10 dollars we exchange it in normal to 30 Dinar ,but now in black market we exchange them for 20 Dinar , we lost 10 Dinar , we need to put this difference in our sales invoice if the sales invoice = 10 dollars in the system we bought it with 20 dinar , we need to add 10 dinar to the sales invoice value to not loss and to purchase invoice we buy it with 10 dollars which equal to 20 dinar and we put 10 dinars so it equal 30 dinar which equal 10 dollars we add 10 extra dinars as lost . how could we do that in erpnext … and how could we know if we are loosing money or having profit ?? i use erpnext but never had this use case !!

If you know the loss/gain before hand, you can add it to the taxes and charges table.

You can also book exchange loss/gain at the time of Payment Entry.