Tags/topics: 
1
Answers
Vote up!
0
Vote down!

Rule for applying UK VAT (TAX) to particular product types

Hi,
When I installed my Kickstart2 I configured it to apply UK VAT to my products. However one of my variation types (products) are books which are not subject to VAT in the UK. I have found the "Calculate taxes: VAT" rule and would like to add a condition that says if the node type is a book not to add the VAT. Unfortunately I am a complete noob and have no clue how yo do this. Please help

Asked by: zapi
on June 20, 2013

Comments

Just a note to add that books are not exempt from VAT but are subject to 0% VAT and you need to show this on a bill.

You should add a second tax rate of 0% and add a condition to its rule component to only apply it to products of type 'books'

- David Kitchen on June 27, 2013

1 Answer

Vote up!
1
Vote down!

Have you looked at the VAT module?

https://drupal.org/project/commerce_eu_vat

That's just a general recommendation. Ok, now on to your question.

The answer is: We can do it! One caveat, though: You must use a Rules Component (it's a rule without an event) and we are assuming your product is only attached to one node.

Ok, so that's two caveats. On to the rules...

Rule 1) Let's change your tax rule to bring in a product field. And then we will add an action that "fetches" an entity based on a property. Basically, we can get rules to tell us the product id and then have it find the first node that has that product attached to it.

http://pastebin.com/dV9pb2fr

^ that's an export of the rule.

Also, let's remove the whole "Calculate a tax" action because we want an additional condition based on all this new information. In order to do that we create a component with two "Provided + Parameters." First parameter should be a "(commerce line item) line_item" and second parameter should be a "(node) product_display." We need the "product_display" to check it's content type and the line item to apply the tax.

Add a condition based on a content type. Add a "calculate tax" action.

Boom!

http://pastebin.com/jSJ0vaEs

Josh

Josh Miller
Answer by: Josh Miller
Posted: Jun 20, 2013

Comments

Thanks Josh,
I have no idea what any of that means but I appreciate your help.

- zapi on June 28, 2013