Correct Currency Exchange Rate Codes in Ticket Template

The USD exchanges to KHR usually $1 = 4100 ៛ So I want to change the code in the Ticket Template that can help cashier calculate.

I want:
Received - Grand Total = Changed
160000 - 149650 = 10350 ៛ NOT 14000 ៛

But I don’t know to do it!
What could I do?
Bill

Here is the Codes:
Ticket.txt

Not done the maths but quick glance i can see one has *4100 and other two have *4000?

Normally $1​ = 4000៛ . *4100 is the Exchange Rate

Example: If the customer pays a bill in the amount of $2 We will not charge but if the customer pays a bill in the amount of 8000​៛​ We will charge 200៛ more.

But thats why it doesnt add up, your using 2 different rates…
Not quite following.

If i do understand you might need to look at doing conversions in a sum rather than converting the usd change amount…
Ie total x4100 minus tendere x 4000 rather than change x4000