Hi,
We are making some tests based on OSCAR 0.6 to create a shop (once released 0.6 will be stable) for one of our client having a B2C approach.
Currently, tax amounts are computed on the fly by the strategy, based on the price_excl_tax value.
The problem with this occurs when the shop's manager wants to sell a product at a precise price including tax (let's say 10€) with a pricing policy based on a fixed rate (for example 20%).
As the amount of the tax has to be rounded using a ROUND_HALF_UP approach, the calculation from price_including_tax to price_excluding_tax is non-symmetrical.
It means that it isn't possible for the manager to fill the prices including_tax and that we determine in the form the corresponding price_excluding_tax even if we know the calculation formula from price_excluding_tax to price_including_tax.
In addition, for some couple of (price_including_tax value,fixed_rate_amount), it doesn't exists any price_excluding_tax, meaning that some price_including_tax values are impossible.
Ex:
Let's say VAT is 0.9% (it exists in France for example), and I want to obtain price_including_tax = 47.65:
If price_excluding_tax = 47.22, tax_amount = 0.42498, rounded using ROUND_HALF_UP and D('0.01') to tax_amount = 0.42 giving a price_including_tax = 47.64
If price_excluding_tax = 47.23, tax_amount = 0.42507, rounded using ROUND_HALF_UP and D('0.01') to tax_amount = 0.43 giving a price_including_tax = 47.66
It appears that the VAT calculation problems (Filling prices including VAT or not, Calculation per line or globally) arises in most of the ERP and e-commerce software with sometimes no real solution proposed.
We're currently thinking about a way to solve this on Oscar, do you have some advice's for us ?
Many thanks for all the efforts you bring on Oscar.
Sincerely,
Benjamin.