Forums / Currencies & Sales Taxes, VAT, GST, etc. / Charge only one tax from resellers

Charge only one tax from resellers

Views: 11,452

Results 1 to 20 of 25
19 May 2006, 12:23 AM
#1
harmeet avatar

harmeet

New Zenner

Join Date:
May 2006
Posts:
30
Plugin Contributions:
0

Charge only one tax from resellers

Hi

I am from Ontario, Canada. Here we charge two taxes from end customers - GST (federal) and PST (provincial). But from resellers we only charge GST.

I have installed Dual Pricing mod on my site which allows me to show wholesale prices to resellers and retail price to end customers.

I have only one problem, on checkout, it adds both taxes to resellers.

What do I need to change to only charge GST from resellers?

Thanks

11 Aug 2006, 4:29 AM
#2
scully2569 avatar

scully2569

New Zenner

Join Date:
Jan 2006
Posts:
13
Plugin Contributions:
0

Re: Charge only one tax from resellers

Did Anyone figure this out yet?

11 Aug 2006, 4:49 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Charge only one tax from resellers

You'll need to write new code to exclude taxes from certain customers.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

12 Aug 2006, 5:59 AM
#4
scully2569 avatar

scully2569

New Zenner

Join Date:
Jan 2006
Posts:
13
Plugin Contributions:
0

Re: Charge only one tax from resellers

Thaks for replying, but I really am not sure how to do that.

13 Aug 2006, 9:12 PM
#5
harmeet avatar

harmeet

New Zenner

Join Date:
May 2006
Posts:
30
Plugin Contributions:
0

Re: Charge only one tax from resellers

Hi scully2569

I was not sure if anybody else needs this. I am not expert, but I managed to hack the code to my needs. Here is how I did it -

Please note that you need to have the "dual_pricing_1_3" module installed before making this change.

Open the file includes/functions/functions_taxes.php

Close to line 32, look for -

    $tax_query = "select sum(tax_rate) as tax_rate
                  from (" . TABLE_TAX_RATES . " tr
                  left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id)
                  left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) )
                  where (za.zone_country_id is null
                  or za.zone_country_id = 0
                  or za.zone_country_id = '" . (int)$country_id . "')
                  and (za.zone_id is null
                  or za.zone_id = 0
                  or za.zone_id = '" . (int)$zone_id . "')
                  and tr.tax_class_id = '" . (int)$class_id . "'
                  group by tr.tax_priority";

Replace it with -

// KLUDGE START by Harmeet - To charge only GST from resellers.
if ($_SESSION['customer_id']) {
	$customers_id = $_SESSION['customer_id'];
	$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
	if ($customer_check->fields['customers_whole'] != "0") {
		$whole = 1;
	}
}
if ($whole) {
    $tax_query = "select tax_rate as tax_rate
                  from (" . TABLE_TAX_RATES . " tr
                  left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id)
                  left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) )
                  where (za.zone_country_id is null
                  or za.zone_country_id = 0
                  or za.zone_country_id = '" . (int)$country_id . "')
                  and (za.zone_id is null
                  or za.zone_id = 0
                  or za.zone_id = '" . (int)$zone_id . "')
                  and tr.tax_class_id = '" . (int)$class_id . "'
                  group by tr.tax_priority";
}
else {
// KLUDGE END
    $tax_query = "select sum(tax_rate) as tax_rate
                  from (" . TABLE_TAX_RATES . " tr
                  left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id)
                  left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) )
                  where (za.zone_country_id is null
                  or za.zone_country_id = 0
                  or za.zone_country_id = '" . (int)$country_id . "')
                  and (za.zone_id is null
                  or za.zone_id = 0
                  or za.zone_id = '" . (int)$zone_id . "')
                  and tr.tax_class_id = '" . (int)$class_id . "'
                  group by tr.tax_priority";
// KLUDGE START by Harmeet - To charge only GST from resellers.
}
// KLUDGE END

Close to line 78, look for -

    if ($tax->RecordCount() > 0) {
      $tax_description = '';
      while (!$tax->EOF) {
        $tax_description .= $tax->fields['tax_description'] . ' + ';
        $tax->MoveNext();
      }
      $tax_description = substr($tax_description, 0, -3);

      return $tax_description;
    } else {
      return TEXT_UNKNOWN_TAX_RATE;
    }

Replace it with -

// KLUDGE START by Harmeet - To charge only GST from resellers.
  if ($_SESSION['customer_id']) {
	$customers_id = $_SESSION['customer_id'];
	$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
	if ($customer_check->fields['customers_whole'] != "0") {
		$whole = 1;
	}
  }
  if ($whole) {
    if ($tax->RecordCount() > 0) {
      $tax_description = $tax->fields['tax_description'] . ' + ';
      $tax_description = substr($tax_description, 0, -3);
      return $tax_description;
    } else {
      return TEXT_UNKNOWN_TAX_RATE;
    }
  }
  else {
// KLUDGE END
    if ($tax->RecordCount() > 0) {
      $tax_description = '';
      while (!$tax->EOF) {
        $tax_description .= $tax->fields['tax_description'] . ' + ';
        $tax->MoveNext();
      }
      $tax_description = substr($tax_description, 0, -3);

      return $tax_description;
    } else {
      return TEXT_UNKNOWN_TAX_RATE;
    }
// KLUDGE START by Harmeet - To charge only GST from resellers.
  }
// KLUDGE END

Hope it works for you.

Thanks

14 Aug 2006, 2:21 AM
#7
scully2569 avatar

scully2569

New Zenner

Join Date:
Jan 2006
Posts:
13
Plugin Contributions:
0

Re: Charge only one tax from resellers

That is awesome, I will tackle that one soon!
Thanks for replying

14 Jan 2007, 1:49 PM
#8
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: Charge only one tax from resellers

sweet this must be the answer i have been looking for?

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

19 Jan 2007, 11:24 PM
#9
fraso avatar

fraso

New Zenner

Join Date:
Dec 2006
Posts:
5
Plugin Contributions:
0

Re: Charge only one tax from resellers

Now it seems that Zen Cart has some code that apparently works for wholesalers (Thanks Harmeet!), I'm going to seriously test how well this works for my needs. However, there is another download (Tax Exemption Status) that seems to be similar to the the modifed Dual Pricing module.

Has anyone set up a store for both retail and wholesale customers so that wholesale customers are exempt from paying provincial retail sales tax (in Canada)?

19 Jan 2007, 11:56 PM
#10
fraso avatar

fraso

New Zenner

Join Date:
Dec 2006
Posts:
5
Plugin Contributions:
0

Re: Charge only one tax from resellers

I see that the Dual Pricing - Wholesale Pricing download (modified with Harmeet's changes) allows a customer to be set up as a wholesale customer who is tax-exempt. However, the Tax Exemption Status download seems to do something similar.

I would like to set my store up as follows:

  • retail prices shown to the general public.
  • wholesale prices shown only to wholesale customers once they have logged-in.
  • wholesale customers are exempt from paying provincial retail sales tax once they provide their tax exemption number.
  • quantity-based discounts for wholesale customers and possibly also for retail customers.What would be the best way to accomplish this?

Frank

16 Feb 2007, 3:15 AM
#11
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: Charge only one tax from resellers

i didn't bother with installing the dual pricing module as it seemed like to much trouble as my site is allready very customized, but i'm curious about the tax exemption module

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

25 May 2007, 2:19 AM
#12
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: Charge only one tax from resellers

fraso:

I see that the Dual Pricing - Wholesale Pricing download (modified with Harmeet's changes) allows a customer to be set up as a wholesale customer who is tax-exempt. However, the Tax Exemption Status download seems to do something similar.

I would like to set my store up as follows:- >

  • retail prices shown to the general public.
  • wholesale prices shown only to wholesale customers once they have logged-in.
  • wholesale customers are exempt from paying provincial retail sales tax once they provide their tax exemption number.
  • quantity-based discounts for wholesale customers and possibly also for retail customers.What would be the best way to accomplish this?

Frank

This is exactly what we are looking for except that we are located in California USA and we would be having our wholesale customers to be exempt from CA sales tax once they provide their seller's permit.

Did you find a solution. I have looked at the dual pricing and other modules but none seem to do exactly what we need and I am afraid of combining them as I am scared of breaking my shop.

We really only want to give discounts to our wholesale customers that we want to approve first and only on a quantity discount basis.

Any help?????

Thanks
Supersnow

6 Jun 2007, 7:34 PM
#13
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Charge only one tax from resellers

supersnow:

This is exactly what we are looking for except that we are located in California USA and we would be having our wholesale customers to be exempt from CA sales tax once they provide their seller's permit.

Did you find a solution. I have looked at the dual pricing and other modules but none seem to do exactly what we need and I am afraid of combining them as I am scared of breaking my shop.

We really only want to give discounts to our wholesale customers that we want to approve first and only on a quantity discount basis.

Any help?????
I am also in the US and we are just now setting up our zen site. Those of us who sell to both retail clients and resellers have some rather unique requirements. In addition to taxable and untaxable customers, our resellers use their own shipping accounts and I have not found a provision to allow a client to store a default shipping method and shipping account number.

Also we offer a global 30% discount to our retail clients but our resellers get a larger discount. If for example a reseller gets 40% off retail, I expected their 40% discount to replace the 30% global disount. It turns out that we must enter their discount as 14.3% so the total of 30% less 14.3% is equal to 40% off the retail price. This gets very confusing for multiple discount levels. If our 30% discount were not global, we would really have a serious problem.

A statement like (IF CustomerDisccount > Discount THEN Discount=CustomerDiscount) were implemented that would solve the problem.

Anyone have solutions or suggestions?

H. Light
Florida

6 Jun 2007, 10:13 PM
#14
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Charge only one tax from resellers

After reading the Dual Pricing module text. It appears that it actually requires two prices per item. I am looking for different % discounts depending on client type. Am I correct that the Dual Pricing module is NOT what I am looking for?

H. Light
Florida

6 Aug 2007, 4:50 AM
#16
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: Charge only one tax from resellers

numinix:

http://www.zen-cart.com/forum/showthread.php?p=408019

Latest version of Customer Tax Exempt which allows administrator to set tax exemption per tax, per customer.

I installed this and it is a great MOD!!! :clap:

Thanks
Supersnow

9 Aug 2007, 5:20 PM
#18
pdprenty avatar

pdprenty

New Zenner

Join Date:
Sep 2006
Posts:
58
Plugin Contributions:
0

Re: Charge only one tax from resellers

Hi, I did a quick and not integrated solution when I couldn't get the Tax exemption module working and I realized that it just basically subtracted the tax.

I will take a look at your Mod when I get time numinix, it sounds like what I am looking for.

Anyway, with the realization that the module is just basically subtracting the tax amount, this is what I did.

I created a "group pricing" under customers called PST exempt and made the discount 7% (BC PST)

When I get a customer who is PST exempt I add them to the PST exempt group and it gives them a 7% discount called "PST exempt"

And last but not least, I changed "Fax number" to "Tax number" everywhere in the files and I can collect the tax number when they set up the account. I Ithink I moved it to show up under "additional contact information" (I don't require Fax numbers so it worked for me)

I have edit order working on my site, so I just go in to their first order and subtract 7% and name it PST exempt. After I move them to the pricing group, they just automatically tax exempt.

I have been setting up my site for a long time (has months turned to over a year) as i have a lot of product, so I haven't really been able to test this except with test orders I create, so I am not sure if there is anything I didn't think of, but it works for now.

I am looking for something that actually removes the tax rather than subtracts it, but up to now I have not seen anything that works.

hth, Pat

9 Aug 2007, 6:18 PM
#19
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Charge only one tax from resellers

I am looking for something that actually removes the tax rather than subtracts it, but up to now I have not seen anything that works.

That is what the latest version of Customer Tax Exempt does...

9 Aug 2007, 10:43 PM
#20
pdprenty avatar

pdprenty

New Zenner

Join Date:
Sep 2006
Posts:
58
Plugin Contributions:
0

Re: Charge only one tax from resellers

I installed your mod and it seems to work great. I haven't done extensive testing to see if it conflicts with any of my many many mods, but I can't see how it would.

It was so simple that I didn't quite get it at first, I thought I should "install" the mod and then do something for each person.

Instead it just simply didn't charge the tax you put in the spot.

Brilliant.

By the way, my fax number to tax number change is good because you can have their (in my case) PST number on "file"

Thanks again.