Negative VAT when using coupon larger then order price
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
- Create a discount code higher then the final order amount
- Use that code to complete the order
- 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
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.
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
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.