Discussions

Taxes based on product?

First of all thank you to this wonderful module of yours!

I've just recently started using Commerce for drupal (yeah less than a week ago!) and i'm setting up my store slowly but surely.

Right now i'm a the point where I need to set up taxes but here's the catch : since I will only (for now) ship to my province I do not need to set up different taxes based on location but rather on product type.

Here in Quebec we have two taxes the TPS (it's the Canadian tax for products and services) and the TVQ (Quebec tax on sales). The first one need to be applied on every transaction you make, the second is conditional.

In my store I have one "line item" and 2 different product types. The first one is "Books" and the second one is "teaching materials". For the books I need to have only the TPS applied (5%) and right now it's working fine.
For the teaching materials I need to have both taxes applied, so I need to know how to set up the taxes so I can have condition based on what type of product.
But it's not over!! It need to be calculated in a certain way.

First the TPS need to be applied on the total, then for the specific items you need to add to their total WITH the TPS applied and add the TVQ...

Here's an exemple for a "normal sale" in which case both taxes would be applied :

Sale price 100,00 $
TPS (100 $ × 5 %) 5,00 $
TVQ ([100 $ + 5 $] × 8,5 %) 8,93 $
Total 113,93 $

But let's say someone is buying a book (20$, and some material for 80$)

Sale price 100,00 $
TPS (100 $ × 5 %) 5,00 $
TVQ ([80 $ x 5 %] × 8,5 %) 7,14 $
Total 112,14 $

In this exemple you take the 80$ of material x 5% = 4$ you add it up to get 84$ and then you add the TVQ (8,5%)

Can anyone around here help me out?

Posted: Aug 15, 2011

Comments