commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Negative VAT when using coupon larger then order price

Open WHITE-developer opened this issue 4 years ago • 2 comments

Description

We noticed today that in some weird situation the VAT can get negative where it should be 0 https://nimb.ws/Mfjp2w It is calculated as the total order is €5 + €18 + €8,95 - €37 = €-5,05 On that negative total you get €-5,05 / 120 * 20 = €-0,84. As the total is actually €0 we believe the VAT should be €0 too as it can be confusing The VAT is set like this https://nimb.ws/eQtasK

Steps to reproduce

  1. Create a discount code higher then the final order amount
  2. Use that code to complete the order
  3. See a negative VAT calculated while the total price is €0

Additional info

  • Craft CMS version: 3.7.10
  • Craft Commerce version: 3.4.4

WHITE-developer avatar Dec 20 '21 16:12 WHITE-developer

Please post all your tax rate rules (screenshot of the tax rate from the CP?), and well as the discount so we can try and reproduce.

lukeholder avatar Jan 04 '22 07:01 lukeholder

The discount code is just a flat amount, no other restrictions. The applied VAT for our case is like this Tax Rate, Tax Zone. The country used in our case is France

Let me know if you need more info

  • Ruud

WHITE-developer avatar Jan 06 '22 11:01 WHITE-developer

I believe this is fixed in the latest release of Commerce. I just tried to reproduce and the tax was zero. Please make a new issue if it persists in recent version of Commerce.

Thanks.

CleanShot 2023-11-20 at 19 23 11@2x

lukeholder avatar Nov 20 '23 11:11 lukeholder