When creating applications that deal with multi currencies it is the norm to hold the following information about each Purchase/Sale
Date
Currency Type
Conversion Rate
Net amount
Vat Rate
Decimal Places
Shipping
Discount rate
This is held at order level only.
Because we know what the net value is and the currency we are dealing with we can suffix the cost with the correct symbol $, £, Euro, etc.
So we take the net and multiply it by the rate then round it to the desired decimal place.
Calculate the VAT based on the vat rate at point of sale.
Add all the other items, where appropriate to reach the gross rate. I have included discount rate as a discount rate can change for customers from time to time. Don't rely on the current rate being accurate.
I remember alot of years age (80's) when EPOS software in the UK was hard coded with the VAT rate. The chancellor in his infinate wisdom decided to change the rate. All the software houses had to rewrite their software to accommodate variable rates. During this period shops were pretending to offer customers goods and services at the old VAT rate. Whereas infact they had to do it because their systems could not calculate the VAT correctly.
CodeMaster: