In Canada we have two kinds of taxes. A federal Goods and Services Tax (GST) of 7% and then in some provinces there is a provincial sales tax (PST) which varies from province to province.

I have created two tax rules one for GST which checks to see whether the buyer's country is Canada and another rule for the provicial tax. However, no tax is being calculated on any of the items. Users checkout their shopping cart and can choose to pay via Credit Card, COD or PayPal and no tax is calculated or collected.

What else do I need to do? Would anyone be able to point me in the right direction?

Regards,
Massoud

CommentFileSizeAuthor
#16 tax.module_2.patch416 bytesJustin Freeman

Comments

Timotheos’s picture

mass0ud’s picture

I guess the patch that you created fixes the PST problem, but how-about GST? On my system even GST is not being calculated.

Thanks in advance.

Cheers,
Massoud

Timotheos’s picture

Does your rule look like this?
Add 7.00% where country = 'ca'

mass0ud’s picture

Yes. I have the following:

Add 7.00% where country = 'ca'
Add 7.50% where state = 'BRITISH COLUMBIA'
Add 8.00% where state = 'ONTARIO'

Even after applying the tax.module.patch no tax is being calculated. Any suggestions?

Cheers,
Massoud

Timotheos’s picture

Yes GST should be working regardless. Sorry I don't know what's wrong as it's working on my setup. :-(

mass0ud’s picture

I am starting to think that there is something really simple that I have done wrong.

Shouldn't taxes be calculated depending on:

1-the customers shipping address (which the cutomer specifies in his/her profile)
2-the location of my business? (I don't know how to specify this)
3-the tax rule (that I have create)

So, I think what is missing and perhaps the cause of my problem is 'my location'. Is this possible? if so, I am unable to find where this needs to be fixed. Would someone please help?

Cheers,
Massoud

Timotheos’s picture

Taxes are based on the billing address.

mass0ud’s picture

I have two Druapl sites running ecommerce. The tax module works on one but not on the other site. I have noticed something that may lead us to a solution.

When I click on the 'checkout':

On the site that works well, I see "Choose a shipping and billing address"

On the problem site, I see "Choose a billing address"

Both sites are running Drupal 4.6.6, ecommerce-4.6.0.tar.gz, plus the patch that 'Timotheos' has created for non-US addresses.

What else can I do to narrow down the problem?

If anyone is willing to work on this or create a patch, I am willing to help debug, test and do whatever it takes to fix this problem. I am not a Druapl or PHP programmer, but I know my way around linux/unix.

Regards,
Massoud

mass0ud’s picture

One more thing!
It is not just the title of the page that is different. On the site that works properly there are two drop down boxes. One for shipping, the other for billing address. On the problem site, there is only one dropdown box for billing address.

Cheers,
Massoud

quebeck’s picture

I discovered this is because the tax only gets added to "shippable" items, which might be the expected behaviour for normal tax but doesn't work for GST countries.

To make the tax apply to all products:

Lines 56 - 60 of tax.module
Before

      foreach ($txn->items as $item) {
        if (product_is_shippable($item->nid)) {
          $taxable_amount += product_adjust_price($item) * $item->qty;
        }
      }

After

      foreach ($txn->items as $item) {
        //if (product_is_shippable($item->nid)) {  <-- Remove this
          $taxable_amount += product_adjust_price($item) * $item->qty;
        //}  <-- Remove this
      }

Would be good to make this a module setting or something.

gordon’s picture

the tax module needs to re done so that it can handle the more complex tax modules. The current system will not do VAT which is similar to GST but more complicated.

mass0ud’s picture

quebeck: Thank you for the piece of code to calculate GST on service products.
gordon: It is good to hear that a new tax module is in the works and that there are tax systems more which are even more complicated than Canada's.

I will post back after I apply these new changes to my tax module.

Regards,
Massoud

rickvug’s picture

Component: tax.module » -- other --

See http://drupal.org/node/75339 for a new temporary solution to this problem.

sime’s picture

Version: 4.6.x-1.x-dev » master

We are not supporting 4.6 now. Putting to HEAD to keep history

sime’s picture

Component: -- other -- » tax

fixing component

Justin Freeman’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new416 bytes

Attached is a patch which removes check which causes tax to be only calculated for 'shippable products'. Another possible approach would be to simply have an option in the tax module settings which enables tax to be enabled / disabled for shippable products only.

Either way, this restriction on when to apply tax needs to be clearer to the Drupal administrator. I spent an hour trying to figure out what was wrong with my products when some had tax and other didn't. I expect there would be many others out there in Drupal E-Commerce land experiencing the same confusion.

Please review :)

gordon’s picture

Version: master » 5.x-3.x-dev
Status: Needs review » Needs work

I will not be applying a patch like this or it will break all the installs that rely on this set up.

In v4 the tax module is going to be removed and this is going to be handled by flexicharge.

Justin Freeman’s picture

Thanks for the response Gordon.

I am trying to apply the Australian GST tax to all purchases in Australia. Tax does this, however Flexicharge does not. With Flexicharge I can only set up: sitewide charges and shipping charges. Neither is applicable since I need to apply GST to only those purchases in Australia.

Can you explain how Flexicharge would be used to calculate GST for sales?

Justin Freeman’s picture

OK I think I get it now, Flexicharge plus a custom Flexicharge provider module to calculate the GST tax is required. Found this here on the Creating a custom flexicharge page, http://drupal.org/node/123026.

Surprised no one has written one already :)

davea’s picture

Status: Needs work » Closed (fixed)

inactive for 1 year+
please reopen if needed.

Thanks,
DaveA