TAX BUG ignored by devs

So, there was at least 2 threads with this issue, and devs still ignoring it.


  1. Settings: tax calculation method based on unit price
  2. Promotion applied to order



    Example:



    Subtotal: 120$ (100$ exc VAT)

    Discount: 10$

    TAX(20%): 20$

    Total: 110$



    Obviously cs-cart sequence of actions is:
  3. Calculate TAX [ 100$ * 0.2 = 20$]
  4. Apply discount



    And I need:
  5. Apply discount
  6. Calculate TAX [ (100$-10$) * 0.2 = 18$]



    Could anyone point me which php files is responsible for this calculation?



    Best regards,

    Giedrius

The way cs-cart sees it, it's not a bug, because you have tax calculated over unit price. In some countries, it works like this. It won't work in Europe though… where it would be better to choose tax based on subtotal. But then there are problems with customers who do not have to pay tax.



So if you also do b2b, for now you will have to use tax based on unit price.



There is an add-on here http://forum.cs-cart…ns-not-correct/ that fixes the tax amount when discount / promotion is being applied, and you have tax based on unit price problem.



It just gives a little error when there is no tax to be paid (for example, outside EU, or b2b orders)… I have this fixed though… so for convenience I uploaded the updated file again here. With thanks to Triplex, who first posted this add-on.



Works fine in 2.24

Thanks Flow, you just saved me a lot of time

I have tested this addon, and have miscalculation for some reason (see screenshot)



Does your Prices includes tax or not?

bug2.jpg

That's probably because the discount is being taken off the price incl. tax.



so tax is being calculated from 120 - 10.



Just checked to be sure and it's working correct in my shop.

but i check that addon this says only subtotal discounts. i need for gift certificates and reward point amounts.

When someone buys a gift certificate he does not pay tax. This is because the actual products have not been sold yet.



When someone use a gift certificate, he pays tax over the amount.



That's the only right way, isn't it? I don't really understand why you want to turn that around.



I'm not sure how it is with reward points, I see cs-cart is treating them like certificates which might be wrong? Anyone?