Tax Configuration
Types of Taxes
Drupal Commerce can do lots of things, but it does two major kinds of taxes "out of the box".
- Sales Tax is the style of tax often used in the US, where many governmental entities impose their own tax on every purchase. It's typically added as a line item in the subtotal.
- VAT is used in much of the rest of the world. In VAT, the total shown to the customer already includes the tax, and nothing is added in the subtotal section (although Drupal Commerce does itemize the tax portion of the total.)
Simple Taxes
If you have a tax which is added to every order without any complex rules, there's nothing to it. Visit the tax rate configuration at Administration -> Store -> Configuration -> Taxes (admin/commerce/config/taxes) and add a tax rate.
For example, to add a sales tax of 10%, I can click "Add a tax rate", fill in the form, put a rate of 0.10, and that's all there is to it. An extra 10% subtotal line item will be added to every order
Conditional Taxes
Unfortunately, the world is not set up to allow us to do simple taxes all the time, and we end up needing rules for them. Drupal Commerce, though, is up to the task. It uses the Rules engine to allow you great power.
Most of the time, we'll be applying different taxes based on the location of the buyer. There are other applications, but we'll demonstrate how to do it based on order address:
- Create a tax. Let's use a sales tax, a Colorado State Sales Tax of 4.3% (.043).
- After creating the tax, you'll be on the Taxes page again. Click "configure component" next to your new tax. That lets you have direct access to the rule that will control this tax.
- Note that there are no conditions yet (because the default is a tax that's always applied). We're going to add a condition.
- Click "Add Condition"
- Select the "Order Address Component Comparison" condition.
- Choose
line-item:orderas the data selector. - Choose the address to work with. If you're using the Commerce Kickstart install profile, you'll probably have just one option here, "Address".
- Choose the address component to work with. I'm going to use "Administrative area (State/Province)"
- Set the operator to equals.
- I'll set the value to "CO", the code for the state of Colorado that is used under the covers in Drupal Commerce forms.
That's it. You can add other taxes based on other address components as demonstrated in the screencast.
Here are two screencasts, the first on basic taxes and the second on conditional taxes.
Drupal Commerce Tax Introduction: Sales Tax and VAT from Randy Fay on Vimeo.
Drupal Commerce Conditional Sales Tax from Randy Fay on Vimeo.


Comments
Help with complex tax set up
I live in California and as you may guess it is one of the most complicated tax systems in the US. Have been working with the tax module all day trying to set up some state and district taxes. Setting up the state was easy due to the great video provided. As a work around i set up a district tax based on the ship to city which added the extra district tax as a seporate line item to the order. This worked just fine with one exception, If the city is Huntington Beach and the value in rules is Huntington Beach it worked great. If however you put huntington beach you get no district tax. The action in rules seams to be case dependent. I can not figure out how to make the action none case depedent. Thought I would use the and / or sequence and put differnt case values in but could not get that to work either. Watched a couple videos on various sites on doing this and still could not figure it out. Can any one help me with this.
I was also thinking if you use the and / or you could build a tax scale where if it placed california sales tax at 7.25% and if it's ship to address city was found it put that district tax with californa sales tax (ie 8.5%). This is beyond my ability to date. If some one knows how to do this or even some one I can hire to help me with this I would greatly appreciate it.
Taxes as part of the advertised price
I want to have my products listed including the GST, but I want the checkout to show the GST component when people go to checkout, so that the invoice can serve as a tax invoice. Is there a way to do this? (BTW, GST is charged at 10% of the untaxed price of the item.)
I can get the GST to add to the price, just cant seem to get it to calculate it as a component of the price.
I'd appreciate any help.
Thanks
Willem
http://everylabel.com.au
AvaTax sales tax module
Configuring Drupal Commerce to calculate sales tax - following the instruction above - is "almost" always sufficient.
There are situations through, usually for either NY, CA, or WA - where the combination of literally 1000's of rates, depending on delivery address location and type of product needs a commercial solution.
We (http://drupalsalestax.com) have built an open source module that works with the hosted service from Avalara, Inc
The module requires the use of a commercial library. Although the module is open source, the library which provides encrypted access to their cloud service is a commercial product, requires SOAP, and is not open source.
If you need help configuring Drupal Commerce, without the use of this commercial solution, please contact us as most sites do NOT require the additional capabilities of tax audit, certificate management or the payments to multiple districts.
But if your site needs these additional capabilities, or the site is being built for a company who already use AvaTax with their ERP system, this module may be solution to issues being raised by the audit and financial side of a larger organization.
To follow current issues on sales tax regulation - see http://open4tax.com - a sales tax forum following issues like Amazon and the state of California, with particular attention to how new legislation is affecting the open source community.
One more thing: if you do a
One more thing: if you do a country comparison, note that you have to use the two digit country code.
Note that line-item:order
Note that line-item:order should be commerce-line-item:order
Hmm.
Hmm. commerce-line-item:order is NOT SELECTABLE in my install...
Javascript'ify?
What if you don't have a Review page set up? Is there a way to add javascript where the tax is added on to the same screen like Ubercart does? I would think the one-form checkout is necessary.
When the Review Checkout page is not used, and the order goes straight to PayPal, the tax is NOT applied.
+1
+1
i looked on the action side to try to update checkout / cart without success
apparently nothing on the view side either (Shopping cart contents)
how to apply the taxe on the amount of the order
Hi,
I use taxes module, and I need to apply the taxe when the total of the order is superior to 750 €
So in my taxe component, I just would add a condition, but I can't find the way
I use :
Data / data comparison
then I try with different data :
site:current-cart-order:commerce-order-total : there's no > sign
site:current-cart-order:commerce-order-total:amount there's > but no Eur, the condition is always true
I try to :
commerce-line-item:commerce-unit-price:amount
commerce-line-item:order:commerce-order-total
but the result is the same...
Can you help?
regards,