craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
215 stars 170 forks source link

Tax categories are being ignored, applied to wrong category items #842

Closed echantigny closed 5 years ago

echantigny commented 5 years ago

Description

I have 2 tax categories. One category with rates applied on Order total taxable, the other category with only one rate (not even sure I need to have the rate) to make it to 0%/no taxes.

When I choose the No Tax category on my product and add it to the cart, both tax rates are being applied.

Expected behaviour: Order total taxable rates would only apply to Line Items that are part of that category.

Side note: I also tried to toggle the Is this tax is already included in the taxable subject?, but I got the message Included tax rates are only allowed for the default tax zone.. I thought that if I checked that, maybe those "no taxes" products would be ignored by other taxes.

Steps to reproduce

I'm adding screenshot at the end here with all the steps I have, but here the run down

  1. Create a tax category (GST) with one rate of 5% applied to Order total
  2. Create a tax category (no taxes) with one rate of 0% applied to Line Item (can we have a category with no rates at all? Tried it with same result anyway)
  3. Create a product and choose the "No taxes" category
  4. Add that product to your cart to see that both taxe rates are being applied to it's price.

Additional info

2019-05-02 08_30_10-Tax Categories - Tax - Great Boardgames 2019-05-02 08_30_27-No taxes - Great Boardgames 2019-05-02 08_30_48-GST - Great Boardgames 2019-05-02 08_33_56-Test Product (no taxes) - Great Boardgames 2019-05-02 08_34_30-Shopping Cart – Great Boardgames

lukeholder commented 5 years ago

Duplicate of https://github.com/craftcms/commerce/issues/538

pixelmachine commented 4 years ago

@lukeholder I don't believe this is fixed and it's not the same as #538

I have a very similar setup to the one @echantigny described with two tax rates and two categories applying to different products (VAT and no tax).

Commerce is not honouring the "Available to Product Types" setting – applying the wrong tax rates to products in different tax categories.

Setting the "Taxable Subject" for both tax rates to line items, sets one of the tax rates on all items even where the products are in a different category. Setting the "Taxable Subject" for both tax rates to the order total, results in both tax rates being shown incorrectly.

This is when amending the tax rules on existing products.

nfourtythree commented 4 years ago

HI @pixelmachine

Just been having a look at this and I don't believe I can replicate the issue you explained on the latest version of Commerce.

For example in the screenshot below I have two tax categories General and No tax they each have a rate assigned. General has VAT which is 20% on the line item and General is set be the default if no other categories are available to the product type. No Tax has a Zero rate applied to the line item and it is set to only be available on the Kids - Clothing product type.

Here is the Cart, showing what I would expect where the first item is in the Clothing product type and the second item is in the Kids - Clothing product type.

It might be worth testing your setup on a fresh install of Commerce locally and using the example templates to see if everything works as expected.