Hi!
The tax calculation with a quantization step make a tax related issue more obvious:
total_tax_A = (2 * product1_price_excl_tax * fixed_tax_rate) + (product2_price_excl_tax * fixed_tax_rate) + (product3_price_excl_tax * fixed_tax_rate)
and
total_tax_b = (2 * product1_price_excl_tax + product2_price_excl_tax + product3_price_excl_tax) * fixed_tax_rate
tax_a and tax_b can be different if we work with Decimals.
In Italy (I suppose it's the same in the other countries???) the Law says that you should always go with the second option.
Also all the shipping charges should be included in this.
A more general example can be:
total_tax = ( 3*product1_price_excl_tax + product2_price_excl_tax + product3_price_ecl_tax + shipping_charges_for_p1_p2_p3_excl_tax) * fixed_tax_rate_a + (2*product4_price_ecl_tax + product5_price_excl_tax + shipping_charges_for_p4_p5_excl_tax) * fixed_tax_rate_b
Oscar atm goes with the first option.
If we remove the quantization step this is less visibile but there is always the possibility that the total tax could be wrong.
Has anyone run into this issue before?
marco