GST

Contrib type: 
Module
Status: 
Work in progress

Downloads

Compatibility: 
Ubercart 1.x

I know there is a VAT module which probably does the same job as this, but GST seems a lot more simple then VAT, so I thought I'd just put together a simple module for it. All this module does is allow you to put in your percentage of GST, then on the review order and order it shows how much GST was included in the order. That way you just include the GST in the price of the product, and this will show the customer how much GST was included in the price. It also calculates the GST on the shipping.

I'd like to have a few more options, but I'm not sure what would be needed. One thing that it doesn't do, is remove the GST amount all together if someone from outside the country is ordering. I think that is the most major thing to add in. Any other suggestions would be good because I'm not an expert on GST and I don't know the differences between GST in Australia and other places.

PreviewAttachmentSize
uc_gst.zip2.92 KB
kimiwon's picture
Offline
Joined: 10/08/2007
Juice: 18
Outside countries don't pay

If you're selling from Australia my understanding is that customers outside of Australia pay while customers inside do. And its about as simple as that.

Its similar in New Zealand accept its a different rate of gst.

daniel.s's picture
Offline
Joined: 10/09/2007
Juice: 87
Re: Outside countries don't pay

That's right, only customers inside Oz pay GST, international ones don't.

I was hoping for one like the other one floating around that adjusts the prices in checkout automatically to include tax, then removes the tax rate at the review stage to apply discounts.

Ideally it would determine if the customer was an international one and not display the GST portion at all.

I'm going to look into all of the above bits and pieces in a few weeks.

ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Re: GST

I think maybe this module has become useless now with the more flexible tax system. I will probably not continue any work on this module unless I get some sort of specific request to add something that the Ubercart tax system doesn't cover.

Please post anything you feel the Ubercart system doesn't handle that a separate module would be able to add in.

Cheers,
Steph

webbasics's picture
Offline
Joined: 11/30/2007
Juice: 2
This is Still Handy

I've just gone through and installed the latest Ubercart and played around with the options available in the tax module. Although very good and flexible I found your module actually comes closer to what we need. That is providing an end price for all users and showing the amount of GST included for Australian customers only, rather than adding it to the end price at the checkout.

However, from testing so far it looks like I need to customise it some more to make sure the GST is only shown if the customer selects 'Australia' in the billing details. Other than that... perfect. I will be uninstalling the default Tax API module and using yours.

Cheers Smiling

ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Re: This is Still Handy

Ok, I'll try to have a look and see if I can update it to only show for Australia.

Thanks for the feedback,
Steph

daniel.s's picture
Offline
Joined: 10/09/2007
Juice: 87
Re: Re: This is Still Handy

Steph, any progress? I'm going to download it now and have a look at it over the next day or so.

ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Re: Re: Re: This is Still Handy

No this is definitely a way older version. I'm still trying to work on something that fits into the current updated system. Unfortunately it looks like my solutions will basically be a copy of a bunch of the current tax system, plus some functions that alter the price of the product when viewing so that it shows the GST included. I think it would be so great and easy if you could just choose a tax to be automatically included in the price of the product, but I don't think that will happen. There has to be a line drawn in the main product somewhere. If anyone else has any other ideas, I'm perfectly open to it, haha.

ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Help with development of new version

Can someone give me a hand by having a look at this attached version?

Basically how it works is you declare a tax in the tax module just like normal. Then go to the GST admin page and choose that tax as GST. I have created 2 new configurations for workflow_ng. One is an exact copy of the one in the taxes module where it calculates the tax and applies it, the other is one that subtracts it. Set the one that applies the tax to happen when the person is in Australia, and the subtract to happen everywhere NOT Australia.

Ok, my problems:

The one that subtracts works fine, but the one that is a copy of the regular tax module does not, because this technically shouldn't be a calculated line item, it should only display. I use the already created tax line item to display the tax and it is calculated. Is there a way to alter a line item to not be calculated, to be display only?

Another worry I have is that even though I am keeping the database stored product price without GST included, I'm still not sure if this module would work with any coupon or discount module correctly. I would need those discount/coupon modules to be using the price without tax included, and I'm thinking that the alterations made in order to display the product with tax included will make it so those modules use the product with tax instead of without.

Anyway, hopefully a couple of other people can have a look (the code is a bit messy, hope you can follow it) and we can get this working for all the Aussie Ubercarters out there.

Cheers,
Steph

AttachmentSize
uc_gst.zip 5.14 KB
kiwi_steve's picture
Offline
Joined: 01/14/2008
Juice: 131
Re: Help with development of new version

Don't forget all the Kiwi UberCarters out there Steph Smiling I can't help with it I'm afraid, as I can't code for love nor money but I'm using your first module at the top and I'm pretty happy with it - but I would like to be able to remove GST for overseas customers.

Thanks for the contribution tho, its saved me a huge headache trying to work out the UC tax setup...

Steve

--- There are no personal problems that can not be overcome with the liberal application of high explosives ---

rolandk's picture
Offline
Joined: 02/06/2008
Juice: 240
Canada Taxes

Yo, yo, yo - we in Canada invented GST !

One major difference is that anyone outside Canada is not charged PST/GST/HST. So i'd also be interested to zero out the tax if outside Canada.

You want to know about taxes - lemme share this:

Anyone care to draw up a Canada tax mod ?

The chart below reflects all the tax rates currently (May 2007) being applied in Canada , by province.
ALBERTA :
GST/HST rate %=6
PST %=not applicable
Combined rate %=6
BRITISH COLOMBIA :
GST/HST rate %=6
PST rate %=7
Combined rate % =13
MANITOBA :
GST/HST rate %=6
PST rate % =7
Combined rate % =13
NEW BRUNSWICK :
GST/HST rate %=14
PST rate % =not applicable
Combined rate % =14
NEWFOUNDLAND & LABRADOR:
GST/HST rate %=14
PST rate % =not applicable
Combined rate % =14
NORTHWEST TERRITORIES :
GST/HST rate %=6
PST rate % =not applicable
Combined rate % =6
NOVA SCOTIA :
GST/HST rate %=14
PST rate % =not applicable
Combined rate % =14
NUNAVUT :
GST/HST rate %=6
PST rate % =not applicable
Combined rate % =6
ONTARIO :
GST/HST rate %=6
PST rate % =8
Combined rate % =14
PRINCE EDWARD ISLAND :
GST/HST rate %=6
PST rate % =10*
Combined rate % =16.7*
QUEBEC :
GST/HST rate %=6
PST rate % =7.5*
Combined rate % =13.95*
SASKATCHEWAN :
GST/HST rate %=6
PST rate % =7
Combined rate % =13
YUKON :
GST/HST rate %=6
PST rate % =not applicable
Combined rate % =6

HST
The harmonized sales tax (HST) applies in the following provinces (the "participating provinces"):

* New Brunswick
* Nova Scotia
* Newfoundland and Labrador

GST and HST are basically the same. The HST rate is 14%.
This means that when an item attracts GST in Canada (like some books), it attracts HST in NB, NS & Newfoundland/Lab.
So, PEI, Quebec, Ontario, Manitoba, Sask, Alberta, BC, Yukon, NW Territories would pay 6% GST on the sale;
but New Brunswick, Nova Scotia and Nfld/Labrador would pay 14% ON THE SAME SALE (and their tax category would read HST rather than GST).

bengtan's picture
Offline
Joined: 01/25/2008
Juice: 18
Feature Request: Line items which are display only

I have filed a related feature request (and offered to submit a patch) at Feature Request: Line items which are display only.

krisbfunk's picture
Offline
Joined: 07/05/2008
Juice: 2
Re: Canada Taxes

What about compound taxes?

Here is a site with a java applet of Canadian Tax rates: (includes source)
http://mindprod.com/applet/canadiantax.html

for the provinces that don't use a harmonized tax, PST/GST needs to be laid out in two separate lines on documents. Quebec and PEI are the only provinces that use compound taxes.

The 3 types of tax are:
GST - federal Goods and Services Tax
PST - Provincial Sales Tax (varies per province)
HST - combined federal/provincial Harmonized Sales Tax (a single, blended, sales tax)

3 Provinces use HST (combined fed/provincial)
- NB, NF, NS

All provinces are subject to federal tax (GST), however 3 of the provinces just use a combined fed/provincial tax (HST).

3 Provinces do not use PST
- AB, YT, NT

2 provinces use compound taxes
- QC, PE

Compound Taxes:
In PEI, GST is applied at 5%, and then PST is applied at 10% to that total. Making it, effectively 10.5%, instead of a combined 15.5%

In Quebec, GST is applied at 5%, and then PST is applied at 7.5% to that total. Making it, effectively 7.875%%, instead of a combined 12.875%

Wikipedia explanation:
http://en.wikipedia.org/wiki/Sales_taxes_in_Canada

If the buyer is out of the country, the all taxes GST/PST/HST are null.
If the buyer is in an HST participating province, and the vendor is not, then only HST is collected. (no GST or PST)
If the buyer is in a non participating province, then GST must be collected. (no PST or HST)
*** It doesn't matter if the vendor is in a participating province.

ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Re: Re: Canada Taxes

Okay well I think I'm going to abandon this module based on the fact there is some pretty heavy work going on getting all this tax stuff into core and into some other modules, unless of course this would be really helpful to update and add some features to. I will monitor for posts for a couple of weeks to see how the main VAT updates are going, and what people post here, but then will mark this as closed or something.

Cheers,
Stephanie

ivang's picture
Offline
Joined: 08/15/2008
Juice: 22
GST rounding issue with 49, 149, 249 etc. values

When using this module - issue rounding values of 49, 149, 249 etc. (GST inc.). The issue caused by rounding prices by 2 decimal digits. This causing impossibility of having 49$ GST inc. It comes as 49.01 or 48.99.

The following code seems to be fixes this issue:

inside the function uc_gst_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { (line #52)

find:

<?php
case 'load':
       
$gst = _uc_gst_calculate($node);
       
//watchdog('GST',$gst);
        //watchdog('sell price',$node->sell_price);
       
$sell_price = $node->sell_price + $gst;
?>

add the following code right after the last line:

<?php
$temp_price
= abs((round($sell_price,2 - round($sell_price,0))) * 100);
       
        if(
$temp_price <= 1) {
           
$sell_price = round($sell_price,0);
           
#drupal_set_message('Temp: '.$temp_price.', sell: '.$sell_price);
       
}
?>

The whole code should look like this:

<?php
case 'load':
       
$gst = _uc_gst_calculate($node);
       
//watchdog('GST',$gst);
        //watchdog('sell price',$node->sell_price);
       
$sell_price = $node->sell_price + $gst;
       
       
$temp_price = abs((round($sell_price,2 - round($sell_price,0))) * 100);
       
        if(
$temp_price <= 1) {
           
$sell_price = round($sell_price,0);
           
#drupal_set_message('Temp: '.$temp_price.', sell: '.$sell_price);
       
}
       
       
//watchdog('sell price',round($sell_price, 2));
       
$node->sell_price = round($sell_price, 2);
       
//watchdog('node',print_r($node,true));
?>

Attaching already patched version of uc_gst module.

AttachmentSize
uc_gst.zip 3.43 KB
matsta's picture
Offline
Joined: 02/12/2009
Juice: 16
GST for D6

Is there anyone planning on creating a GST module for Ubercart 2.x Drupal 6?

This would be fantastic if this module could be upgraded.

matsta's picture
Offline
Joined: 02/12/2009
Juice: 16
GST module for D6 is available

Sorry, was a little hasty with my earlier post.

http://drupal.org/project/uc_gst

christmartin157's picture
Offline
Joined: 10/09/2012
Juice: 3
Re: GST

I think VAT is a cool module. But my first nag with it is that it isn't extensible. - The first issue in the projects' issue queue is a feature request to add the german VAT validation. - it only supports BE and NL VAT validation and those are hardcoded into the module.

Iveresel12's picture
Offline
Joined: 10/29/2012
Juice: 3
Re: GST

The Commerce EU VAT module is designed to do exactly what you want. It sounds like you have enabled the Reverse Charge and the Intra-Community sale modules, however they only work automatically with the country rate sub modules.

You can either add the Place of Supply rule component to your existing tax component or wait and I will ad a Hungarian sub module to the VAT module.