Documentation

Tax Configuration

Types of Taxes

Drupal Commerce can do lots of things, but it does two major kinds of taxes "out of the box".

  1. 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.
  2. 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:

  1. Create a tax. Let's use a sales tax, a Colorado State Sales Tax of 4.3% (.043).
  2. 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.
  3. Note that there are no conditions yet (because the default is a tax that's always applied). We're going to add a condition.
  4. Click "Add Condition"
  5. Select the "Order Address Component Comparison" condition.
  6. Choose line-item:order as the data selector.
  7. Choose the address to work with. If you're using the Commerce Kickstart install profile, you'll probably have just one option here, "Address".
  8. Choose the address component to work with. I'm going to use "Administrative area (State/Province)"
  9. Set the operator to equals.
  10. 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

nelslynn on July 5, 2011

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.

miaoulafrite on February 20, 2012

+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)

tOf on March 28, 2012

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,

adTumbler on December 29, 2013

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 at - http://drupalsalestax.com - have built an open source module that works with the hosted service from Avalara, Inc

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.

willem on April 9, 2012

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

ontwerphuis on August 7, 2012

Hi Willem,

Did you find a solution to the above? I need to display the VAT in the Checkout too.

Thanks

Z

UDG_Italy on April 29, 2013

Hi,
I'm new to DC and met a problem similar to yours.
In Italy we have different VATs based on products' type (e.g. foods 10%, shoes 21%..) and it's mandatory to show the final price (net price+vat) to the public.

What I did so far is:
- Product - Price: set as the final price for that item (net+appropriate vat)
- Product - Include tax on this price : selected the appropriate tax rate used in calculation above
- Category - used to classify each product in an equal-vat class (e.g. shoes)
- Store-Taxex rules: a rule for each VAT group and a condition set on each different VAT with data selector = commerce-line-item:order and Product types = every category associated with that vat rule.
- Store-Pricing rules: disabled both Calculated taxes (sales tax and VAT).

The net result is:
- on the product page, it's showed the final price for the item (what the customer pays)
- on the checkout cart page, each item shows its final price, the subtotal shows the combined net prices and following the subtotal there are as many rows as different vats used, each with the exact amount out of the item using that VAT. Last row, Total, shows the combined final prices of all the items in the cart and that is what the customer pays in the end.

I hope this could help in some way.

kpope on April 25, 2012

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.

willem on June 3, 2012

G'day guys.

I have set up the GST tax on my websites after I had already built numerous products (about 20 000!) and I now want to switch the GST on on all the products so that the GST is included in the price. I can do this quite easily by opening the products one by one and changing them, but with 20 000 products that is not a realistic option.

There must be some way to do this without too much pain?

Thanks

Willem

UDG_Italy on April 29, 2013

Hi again.

Try having a look on field commerce_price_data in table field_revision_commerce_price.
There I find a reference to the tax rate applied to a specific product item, so a SQL update query could solve the problem.
A message to the support staff would be a wise action before trying any SQL experiment..

tahiticlic on October 2, 2012

Anyone having a method to set multiple VAT rates depending on a product field ?

I precise that my commerce products are generated thru rules (clients edit only the display products), si there's no way to set the "Include this VAT rate" for each commerce product.

cocoshogo on March 20, 2013

I have the need to set a non percentile tax. It has to be a fixed price. Can this be done with tax. Currently I only see the ability to set a percentage.

svouthi on April 11, 2013

Hello,

As another unfortunate Californian, I was ready to begin pulling my hair out when it came to setting up taxes for in state sales. However, the BOE website states:

The total tax rate in effect in a special tax district (statewide rate + district rate) generally applies to sales delivered or shipped into the district. However, if you are not engaged in business in the district, you are not required to collect the district use tax. Instead, you may calculate the tax due on your sale at the statewide rate of 7.50 percent (see "Courtesy collection of district use tax," below). You are considered to be engaged in business in a special tax district and must report and pay district use tax if any of the following apply:

Have any kind of permanent or temporary business location in the district, including a warehouse, salesroom, or office;

Have any kind of representative or agent in the district, even temporarily, who makes sales, takes orders, or makes deliveries for you;

Use your own delivery vehicles to regularly deliver merchandise into or within the district; or

Receive rental income from the lease of merchandise located in the district.

(see Pub. 105: http://www.boe.ca.gov/formspubs/pub105/index.html)

What cracks me up is that the publication states: "As a courtesy to your customer, you may choose to collect the district use tax from them." with the first half of the statement in italics. Yes, a courtesy.

All the best to those of you in other states - defend against Californication! Here we pay taxes even on items we bring into the state just to store, and business must pay annual property taxes on furniture and office supplies. King Arthur said it best in Monty Python and the Holy Grail - "Run away! Run away!"

Maureen Goodin on May 1, 2013

Nothing is added in the subtotal section although Dru pal Commerce does itemize the tax portion of the total.

jmoruzi on May 2, 2013

Does anyone know of a way to alter the order of the tax lines showing on the checkout screen. With my setup I get:

Subtotal
Shipping Tax
GST
Shipping Cost
Order Total

The tax rules all work, but ideally I would like to have the shipping tax line item appear after the shipping cost line item instead of at the top of the tax list. I've tried adjusting the weights of the tax rules but it seems to make no difference.

Anyone have any ideas? Thanks in advance.

Summit on August 6, 2013

Anyone with a solution how to get Tax after shipping so shipping is included in the tax calculation? This is needed in The Netherlands with VAT handling.
greetings, Martijn

RiBu-Nezz on October 15, 2013

I need some advice.

The price that is showing in the site is the total price that customer gonna pay.

In the Check out process, I wanna show how much the VAT is but I don't want to add the VAT in the total. I only wanna show how much the VAT is. example:

1 product costs 1000€

Subtotal 1000€
VAT include in the price 250€
Order total 1000€

As you see the total is still the same price which doesn't add the VAT price.
How I can do that?

Thanks for any help!

webbydoug webbydoug on November 26, 2013

No tax on gift certificates.

Seems like I should find this answer fairly easy, but how do I set-up rule so that tax is not applied to specific product type? I have a store in FL and got that tax rule right, but store sells gift certificates and sales tax is not applied to that type of product (as the one using the gift certificate pay the sales tax). I have tried many variations, but line-item still figures tax.

Thanks for help.

dupls on November 27, 2013

Hay jmoruzi could you share how you managed to set tax on shipping. I don't seem to have the Apply sales tax to shipping field in rules that everyone is talking about. I have shipping module and can charge shipping but I need to charge GST on shipping.
thanks a bunch

stopshinal on December 10, 2013

I need to charge a flat rate + percentage fauk tax to all orders - is this possible through the use of the tax module or should I be looking for an alternative approach?