The default sales tax Component Rule calculates sales tax on all line items... so it was (for us) correctly adding sales tax to products and shipping line items. We started using Userpoints_Discount and I created a new Product Type 'Points' to allow users to purchase Userpoints. I then edited the Component Rule as below. So now, it calculates Sales Tax on the product which are NOT 'Points' (good) but it has stopped calculating sales tax on shipping (bad).
Can someone look at this Component Rule and explain why the Shipping Line Item is no longer having sales tax calculated?
The logic should be:
IF Commerce Line Item IS IN bundle Products OR bundle Shipping
AND Commerce Line Item Product Type IS NOT 'Points'
I am using Commerce Kickstart 2.
{ "commerce_tax_rate_state_of_washington" : {
"LABEL" : "Calculate State Of Washington 9.5%",
"PLUGIN" : "rule",
"OWNER" : "rules",
"TAGS" : [ "Commerce Tax", "sales_tax" ],
"REQUIRES" : [ "rules", "inline_conditions", "commerce_tax" ],
"USES VARIABLES" : { "commerce_line_item" : { "label" : "Line item", "type" : "commerce_line_item" } },
"IF" : [
{ "AND" : [
{ "entity_is_of_bundle" : {
"entity" : [ "commerce-line-item" ],
"type" : "commerce_line_item",
"bundle" : { "value" : { "product" : "product", "shipping" : "shipping" } }
}
},
{ "NOT commerce_product_has_type" : { "commerce_line_item" : [ "commerce_line_item" ], "type" : "points" } }
]
}
],
"DO" : [
{ "commerce_tax_rate_apply" : {
"USING" : {
"commerce_line_item" : [ "commerce-line-item" ],
"tax_rate_name" : "state_of_washington"
},
"PROVIDE" : { "applied_tax" : { "applied_tax" : "Applied tax" } }
}
}
]
}
}