Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Local Sales Tax Mod - Support Thread

Local Sales Tax Mod - Support Thread

Views: 273,272

Results 121 to 140 of 659
05 Mar 2009, 23:01
#121
defined_by_eye avatar

defined_by_eye

New Zenner

Join Date:
Sep 2008
Posts:
8
Plugin Contributions:
0

Local Sales Tax Mod - Support Thread

Feature request :ohmy:

How much work would it be to reference the tax lookup tool instead of the database for all washington state taxes? You would be our hero if it could be implemented!

http://dor.wa.gov/Content/FindTaxesAndRates/RetailSalesTax/DestinationBased/ClientInterface.aspx

I've written a bit of PHP to send the city/state/zip and parse the URL results if you are interested.

06 Mar 2009, 00:24
#122
inkuyo avatar

inkuyo

New Zenner

Join Date:
Sep 2007
Posts:
73
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Defined By Eye:

Feature request :ohmy:

How much work would it be to reference the tax lookup tool instead of the database for all washington state taxes? You would be our hero if it could be implemented!

http://dor.wa.gov/Content/FindTaxesAndRates/RetailSalesTax/DestinationBased/ClientInterface.aspx

I've written a bit of PHP to send the city/state/zip and parse the URL results if you are interested.

I too would love to have it. I don't have the time right now, but will take a look more in depth. Had not been extremely important since most of my clients sales have been out of state. Local sales tax mod works OK but is a lot of manual input.

I need to correct an earlier comment about the calculation of SHIPPING versus BILLING address. That setting is done under --> configurtion --> my store --> Basis of Product Tax.

If you want to PM the PHP code you have written I can see if it can work as the basis. All in all it looks like it would be a mod of the local sales tax mod coding and be used for ONLY WA given that it calls for the sales tax codes in WA.

Maybe in the next few weeks I can take a closer look. It would make life easier, especially since the tax rates go up AGAIN on April first.

18 Mar 2009, 19:03
#123
nsirago avatar

nsirago

New Zenner

Join Date:
Oct 2007
Posts:
4
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Google Checkout Solution

I have only tested this for about 5 minutes but it worked every time. :) Give this a shot to incorporate this mod into your Google Checkout.

In gcheckout.php (on or around line 719 there is a SQL query, I changed mine to:

$tax_result = $db->Execute("SELECT
zen_tax_rates_local.local_tax_id,
zen_tax_rates_local.zone_id,
zen_tax_rates_local.local_fieldmatch,
zen_tax_rates_local.local_datamatch,
zen_tax_rates_local.local_tax_rate,
zen_tax_rates_local.local_tax_label,
zen_tax_rates_local.local_tax_shipping,
zen_tax_rates_local.local_tax_class_id
FROM
zen_tax_rates_local
WHERE
zen_tax_rates_local.local_datamatch = " . SHIPPING_ORIGIN_ZIP . "");

on or around line 743 you should see
$rate = ((double)($tax_result->fields['tax_rate']))/100.0;
change that to
$rate = ((double)($tax_result->fields['local_tax_rate']))/100.0;

I also got rid of a few lines. You won't be able to copy/paste my changes but this will definitely get you 80% there. I have pasted the entire foreach below. Modify as necessary. I'm doing zip code lookups. It will only work with zip codes.

foreach($tax_array as $tax_table)  {

    
   $tax_result =  $db->Execute("SELECT
zen_tax_rates_local.local_tax_id,
zen_tax_rates_local.zone_id,
zen_tax_rates_local.local_fieldmatch,
zen_tax_rates_local.local_datamatch,
zen_tax_rates_local.local_tax_rate,
zen_tax_rates_local.local_tax_label,
zen_tax_rates_local.local_tax_shipping,
zen_tax_rates_local.local_tax_class_id
FROM
zen_tax_rates_local
WHERE
zen_tax_rates_local.local_datamatch = " . SHIPPING_ORIGIN_ZIP . "");
                                          
  $num_rows = $tax_result->RecordCount();
  $tax_rule = array();


  $GAtaxTable = new GoogleAlternateTaxTable((!empty($tax_name_array[$i])?$tax_name_array[$i]:'none'), 'false');

  for($j=0; $j<$num_rows; $j++) {
    $tax_result->MoveNext();


    $rate = ((double)($tax_result->fields['local_tax_rate']))/100.0;
    $GAtaxRule = new GoogleAlternateTaxRule($rate);
	$GAtaxRule->SetStateAreas("CA");
		
    			
    $GAtaxTable->AddAlternateTaxRules($GAtaxRule);
  }
  $i++;
  $Gcart->AddAlternateTaxTables($GAtaxTable);  
}
21 Mar 2009, 07:20
#124
phoeuth avatar

phoeuth

New Zenner

Join Date:
Dec 2008
Posts:
28
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

First of all, Thank You for this mod. Ok I finally got this mod to work but I am having a few issue. Am using zen cart 1.3.8 and I am using PayPal Express as my only method of payment. My business is base in california and i set my tax rate for california at 7.25, then I use the local tax mod to calulate by zip code to add .50 to customers who I ship to in my county. It work flawlessly and my invoice on zen cart would read:

Sub-Total: $36.90
Zone Rates (Shipping to US): $9.80
CA Sales Tax: $2.68
92592 Local sales tax 0.50%: $0.18
Total: $49.56

But on my PayPal invoice it would read:

Item Amount:
$36.90 USD
Shipping:
$9.80 USD
Handling:
$2.68 USD
Quantity:
1
Sales Tax:
$0.18 USD

PayPal is using the ca sales tax data and reading it as Handling, and using the local sales tax as the sales tax. Is there a way to get PayPal to use my ca sales tax and the local sales tax and read it as sales tax only. I've read the above post but I was scared to use it since it was only 80% of the code and wouldn't be able to figure out the other 20%. Please help. Your knowledge is very much appreciated. Thanks in Advance.

25 Mar 2009, 06:58
#125
phoeuth avatar

phoeuth

New Zenner

Join Date:
Dec 2008
Posts:
28
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Anyone please help. Someone gotta know how to fix this.

25 Mar 2009, 14:08
#126
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

phoeuth,
I'm sorry for the delay in responding, but the paypal modules are far from simple and it takes a while to track down an issue like this.

From what I can tell the problem is that the paypal mods are not setup to handle multiple taxes. Its only looking for one tax, it finds it and any difference in the total it simply adds it on as handling.

The other issue here is that I dont use paypal express, which makes the problem difficult to trouble shoot.

I will keep looking into it as best I can, but this may require the assistance of someone who is more familiar with the paypal payment mods than I am.

LadyHLG

03 Apr 2009, 20:05
#127
patternman avatar

patternman

New Zenner

Join Date:
Jul 2008
Posts:
63
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

zcnb:

LadyHLG, thank you again for the marvelous job you have done here.

I hope that you will still be able to release a quick patch/fix as I discovered a glitch/pitfall in the current version: If the customer enters a ZIP+4 code, and the Local Sales Tax Mod is configured to use Zip Codes (instead of city/town names), then the Mod will not calculate local tax for that customer.

In a way, it is similar to the problem of a user entering "S Royalton" or "S. Royalton" instead of "South Royalton"... except that the ZIP+4 code problem is easily solvable in the PHP code.

(BTW, limiting the customers to enter only 5 digits for the zip code as a workaround might not be a good idea as there are countries in which there are more than 5 characters in the zip code)

Hello,
I was wondering if there was any progress on this particular glitch. I am using ZIP+4 codes and this has become quite an obstacle.
Thank you.

06 Apr 2009, 16:09
#128
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

patternman,
Try this,
Open includes\modules\order_total\ot_local_sales_taxes.php

At about line 151 look for :

$listarray = explode(";", $taxto);

Just after that add the following:

// get only first 5 of zip code
if($taxmatch == "postcode"){
$myfield = substr($myfield,0,5);
}

This fix will only work when the CUSTOMER enters zip+4 NOT if the database is set up for zip+4!

Hope that helps!
LadyHLG

06 Apr 2009, 20:02
#129
patternman avatar

patternman

New Zenner

Join Date:
Jul 2008
Posts:
63
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Awesome!
That worked just fine.
Thank you so much.:D

06 Apr 2009, 22:30
#130
cafinity avatar

cafinity

New Zenner

Join Date:
Apr 2009
Posts:
3
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

I need to charge a local tax on a specific type of product but no state tax on that product, on other product I need to charge both a state and a local tax.
Consumable items (like coffee) are not charged an Arizona sales tax but,
Consumable items (like coffee) are charged an Scottsdale City sales tax 1.65 %
Non Consumable (coffee pots) are charged a AZ sales tax 6.3 % and a Scottsdale sales tax of 1.65%

The mod is install and I have set up the local tax rate, but no local tax is charged.

I have set a seperate tax class for the the local tax, because the consumable product was being taxed at the state tax rate with no local tax included.
Any idea of where I am going wrong

06 Apr 2009, 23:46
#131
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

Cafinity,
Check your mod sort order.

LadyHLG

07 Apr 2009, 18:38
#132
cafinity avatar

cafinity

New Zenner

Join Date:
Apr 2009
Posts:
3
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Okay, it's chargeing the local sales tax and adding it to the total,
but it is not displaying the actual tax ammount.
The display show state sales tax 0 which is correct. (No state tax for this product) There is no display for the local tax ammount but it is added to the total ammount. How do I get the local tax to display?

07 Apr 2009, 18:43
#133
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

Cafinity,
I think you still need to adjust the sort order some more.

Make the sort order for the local sales tax mod lower than that for the tax. So if your tax sort order is 300 make the local sales tax 299.

LadyHLG

08 Apr 2009, 13:46
#134
cafinity avatar

cafinity

New Zenner

Join Date:
Apr 2009
Posts:
3
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

That was the fix.
Thankyou for your help

27 Apr 2009, 23:24
#135
psychicpet avatar

psychicpet

Inactive

Join Date:
Sep 2007
Posts:
44
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

I have been using this mod successfully for about a year and I am about to set up a new site. Since CA just had a major update to most of its local tax rates I was wondering if I could just use MySQL to upload the new rates. I was able to download all the rates from the BOE's website in the following format:

City Tax County

Acampo 8.750% San Joaquin
Acton 9.250% Los Angeles
Adelaida 8.250% San Luis Obispo
Adelanto 8.750% San Bernardino
Adin 8.250% Modoc

Problem is, I am not too sharp with MySQL... Can anyone assist with this? I am also attaching the 2009 CA City rates for anyone else that might need them (csv format)!

27 Apr 2009, 23:29
#136
psychicpet avatar

psychicpet

Inactive

Join Date:
Sep 2007
Posts:
44
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Here is that file... I had to save it as a CSV to meet the forum file size guidelines.

28 Apr 2009, 14:02
#137
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

psychicpet,
Are you using these rates strictly as a city name match or are you using them in some combination with the county name for more specific tax matches? Each solution will require a very different set up.

LadyHLG

30 Apr 2009, 12:23
#138
m4w29c avatar

m4w29c

New Zenner

Join Date:
Apr 2009
Posts:
34
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

psychicpet:

Here is that file... I had to save it as a CSV to meet the forum file size guidelines.

DUDE!!!!! YOUR ROCK!!!!

I have been trying to get these rates for a week now! THANK YOU! THANK YOU! THANK YOU!!!!:clap::hug::blush:

30 Apr 2009, 23:29
#139
psychicpet avatar

psychicpet

Inactive

Join Date:
Sep 2007
Posts:
44
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

LadyHLG,

I have one site where I did it all by zip code without using the CSV info I posted. I am setting up a new site and I am hoping to do it by city.

Anyone have advice on how to upload that data via MySQL?

thanks

30 Apr 2009, 23:40
#140
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

psychicpet,
In order to upload the data you will need to get the data organized first. The data provided as is from the state of CA will not work as I am sure there are duplicate city names (this happens when a city spans more than one county and therefore may have different tax rates for different parts of the city in each county). The only way you can have duplicate city names is if you are using counties as zones and each city name is linked to a different zone (i.e county). This is not a simple process, but is much more accurate than assigining a single tax rate to a city name.

If you do not want to use the cities by county method then you will have remove all the duplicate city names otherwise you will run into problems with the tax mod.

Once you get the data organized that far I can help you get it into the proper format to upload via mysql.

LadyHLG