-
1 Attachment(s)
California Sales Tax Module
I've implemented a tax module for California. According to the BOE, you're supposed to charge CA local tax based on where the items are going to be shipped. However, any tax that you don't collect is the responsibility of the buyer ... they're the ones who are supposed to submit the tax that they didn't pay. So, I decided to implement something simpler such as what newegg.com does.. basically, you charge your local tax if the order is shipped to your local county, and 7.25% to other destinations in CA. Out of state is not charged tax.
My module contains all of the zip codes in Los Angeles County, and charges 8.25% if the item will be shipped to a zip code withing LA County.
You can easily modify the module to work w/ other states and zip codes.
This is a quick and dirty hack.. the data are all hard coded into the PHP, rather than using SQL ... perhaps I will go back and make it fancier if I have time in the future.
-
1 Attachment(s)
Re: California Sales Tax Module
I decided that my quick and dirty implementation was too ugly, so I implemented a database version today. You put all your local zip codes into a table called local_zips, and then the php does a query to decide whether or not the zip code is local.
The non-database version is also included in the new zip archive.
-
Re: California Sales Tax Module
Thanks for this ! Saves a LOT of set up time for us Californians :D
-
1 Attachment(s)
Re: California Sales Tax Module
Oops! Sorry I left some debug messages in scl-zip-tax-v2.zip... but for some strange reason I can't edit my previous posts. So here is it again, w/o the debugs.
-
Re: Need Local Taxes separated out in admin area
Hi there,
It sounds like this might be what I am looking for...
The store is located in Ontario, Canada...and I need to be able to separate out the local and federal taxes in the sales report so the client can remit the appropriate amounts to the government at tax time.
Is there a quick way to change this module to allow this, or is there another solution more suitable...
I had tried the sales report with local filter, but it filters for California and I am not sure how to change that - I get an error message when I change it to Ontario in the stats_sales_report.php file.
Please help! :)
-
Re: California Sales Tax Module
I found the answer.
I just changed shipping_state':'billing_state to delivery_state':'delivery_state in classes/sales_report.php (line 105)
and
California to Ontario (line 65) in stats_sales_report.php.
:)
-
Re: California Sales Tax Module
I'm assuming I could use this module for NY and just change the ZIP codes?
-
Re: California Sales Tax Module
Thanks, this is very nice. I'll check it out right away.
Just one thing, you mention "any tax that you don't collect is the responsibility of the buyer ... ", I think that's wrong, it's the other way around. You (the seller) are resposible for paying sales tax to the BOE, you are allowed, but not required, to pass this cost on to the customer, but you are the one ultimately responsible for making sales tax payments.
I just charge 8.25% for all of California. The BOE does allow this and doesn't mind, it just says if you over-collected just send it all to them. I think most companies do it this way, it's just too much of a hassle figuring it out for all counties/districts unless you only deal withing your local zone.
-
Re: California Sales Tax Module
Does this module work with: Zen Cart 1.3.0.2
-
Re: California Sales Tax Module
I have Zen cart 1.3.6 (the latest version) and I want to know the advantages and disadvantages of doing it via PHP file or the database.
-
Re: California Sales Tax Module
Awesome Module!
Quick question though...
When using this module i get the following in the Order Total Section of the checkout process:
select zip from local_zips where zip='92128'
How can I get rid of this? Thanks!
-Jeremy
-
Re: California Sales Tax Module
I am getting a similar error:
select zip from local_zips where zip='92822'
1146 Table 'db188733754.local_zips' doesn't exist
in:
[select zip from local_zips where zip='92822']
It works fine for out of state zip codes but not local.
-
Re: California Sales Tax Module
Your "table does not exist" errors indicate that you neglected to install the database table required for the mod to work.
The readme.txt explains to do that.
-
Re: California Sales Tax Module
I tried installing the database but I am having a bit of trouble.
My host uses MySQL. Here is what I have done so far:
I go to the database and click on phpMyAdmin and see a list of all the tables.
At the bottom, I see: Create new table on database. I use the name provided in the readme.txt notes. The setup asks me for how many fields, I entered 1.
I change all the attributes to match the sql.txt example. The only thing I wasn't sure about is the type. I left the default which is MyISAM.
It looks like I have everything setup. It looks like I can add them one at a time but is there a way to import a file? I see a link for: Insert data from a text file into the table.
Do I just edit the sample lacountylocalzip.sql txt file so it starts with this (removing the CREATE TABLE stuff at the top of the example):
INSERT INTO `local_zips` (`zip`) VALUES(90001);
INSERT INTO `local_zips` (`zip`) VALUES(90002);
INSERT INTO `local_zips` (`zip`) VALUES(90003);
INSERT INTO `local_zips` (`zip`) VALUES(90004);
INSERT INTO `local_zips` (`zip`) VALUES(90005);
INSERT INTO `local_zips` (`zip`) VALUES(90006);
INSERT INTO `local_zips` (`zip`) VALUES(90007);
Then send it up?
-
Re: California Sales Tax Module
No.
Select your Zen Cart database from the left pulldown menu.
Then click on the "Import" tab across the top right (if no "Import", choose "SQL").
Then you can either paste the contents of the lacountylocalzip.sql file in the textbox, or you can browse for the file and upload/submit it.
That should create the table and insert the required records.
If you specified a "table prefix" during installation of your Zen Cart system, you'll need to make some changes to the lacountylocalzip.sql file contents before you do this. You can determine this by checking if your "DB_PREFIX" setting in the /includes/configure.php file is set to blank (ie: '').
-
Re: California Sales Tax Module
Think I got it now! Thanks!
One last question. When I use the checkout, step 2 (Payment information) shows this in the YOUR TOTAL box.
select zip from local_zips where zip='92822'
Is there a way to change this?
-
Re: California Sales Tax Module
Could sure use some help installing this? Thanks
-
Re: California Sales Tax Module
Quote:
Originally Posted by
creeperkat
Think I got it now! Thanks!
One last question. When I use the checkout, step 2 (Payment information) shows this in the YOUR TOTAL box.
select zip from local_zips where zip='92822'
Is there a way to change this?
I second that how to change it?? very nice hack thank you
-
Re: California Sales Tax Module
This sounds like a nice module and I am looking to adapt it to Orange County California.
I have a question about implementation: Why the reliance on zip codes, rather than say, city names. The BOE provides both CVS and Excel versions of the tax rates linked to City and County names, but no zip code information.
Can this module be adapted to work with city names instead of zip codes? Not sure where to get the necessary zip code information.
Thanks for the contribution.
Regards,
Mark Harrison
-
Re: California Sales Tax Module
It would be nice to see this work with cities as well, instead of zip codes. The state publishes a free database that has tax rates based on cities, that is constantly updated. Here is the link for the state database. Thank you.
http://www.boe.ca.gov/sutax/pam71.htm
-
Re: "select zip from local_zips where zip='$zip'";
response to creeperkat, jeremy7786, wickedstangs, perhaps others:
Regarding the message displayed on the Order Total section of the checkout process that reads "select zip from local_zips where zip='#####'" where ##### is a zip code:
First, if the message also mentions "does not exist" then do as DrByte mentions: verify that your local_zips table has been installed in your database. If you have a unique table prefix, you must go through the code in includes/modules/order_total/ot_zip_tax.php and add the prefix to every instance of 'local_zips'. For instance, I use the characters"as" for the prefix to my tables so I changed each instance of 'local_zips" to 'as_local_zips'.
This should eliminate the "does not exist" message, however you may still get the rest of the message ("select zip from local_zips where zip='#####'). If you would like to remove this message from your displays then open the following file in an editor:
Code:
file: includes/modules/order_total/ot_zip_tax.php
Find the following lines:
$selstr = "select zip from local_zips where zip='$zip'";
echo $selstr;
Change to:
$selstr = "SELECT zip FROM local_zips WHERE zip='$zip'";
// echo $selstr;
That should clear it up.
Also, I found an error in the included readme.txt file for this contribution:
In the instructions "to install the database version:" in step 3 there are two files you should copy to your store. The second one reads includes/modules/ot_zip_tax.php when it should read includes/modules/order_total/ot_zip_tax.php.
It's possible a similar error appears in step 2 of the instructions "to install inline zip version" but I didn't use that method so have not verified it as an error.
Once I made the above changes I found this contribution to work very smoothly.
Ron
-
Re: California Sales Tax Module
ronlee67 Nice fix thanks..
-
Re: California Sales Tax Module
A desireable enhancement would be to provide for additional taxes for specific zip codes.
For instance, in my case I have four separate jurisdictions to consider. Each covers different or overlapping geographical/political areas.
My store is located in all four areas.
The four jurisdictions are:
1. State
2. County
3. Rural Transport Authority (RTA)*
4. City
*The RTA tax involves several communities within the county but does not cover the entire county.
Since I am located in all four, I have to collect tax for one of these combinations depending on where the order is delivered:
1. Out of state (no tax)
2. In state, but not in my city or county (2.9%)
3. In-state, in-county (2.9% + 1%=3.9%)
4. in-state, in-county, within RTA areas (2.9%+1%+1%=4.9%)
5 in-state, in-county, in city (and by default: within RTA because my city is within RTA). (2.9%+1+1%+2.5%=7.4%)
In my case differentiating these areas by zip code combinations would work fine. It still leaves a problem when a zip code extends outside a taxing area. The only idea that comes to mind would be to add a flag table in the database that would allow the administrator to flag specific accounts to override default tax or taxes. (This could also be used by the administrator to flag any accounts that are tax exempt). In order to do that efficiently, code would need to be written to provide this functionality in the admin console.
Anybody got any thoughts on this or perhaps someone willing to write a new version?
-
Re: California Sales Tax Module
I had thought this was functioning correctly when I installed it - at least it appeared to be! Today I've been alerted to an issue.
Everything is being taxed. I have one tax class: Taxable Goods - items that are set to none are getting taxed. It does appear to be working correctly with that execption. Any thoughts appreciated.
-
Re: California Sales Tax Module
Oh, and one other thing... I used the above comment to get rid of
"select zip from local_zips where zip='#####'"
Now it just displays FALSE
I'm in Vermont, so the zip codes begin with zero which is left off when the above was displayed before I commented out "echo $selstr;"
Thanks...
-
Re: California Sales Tax Module
I been lookin' for something like this too! Can't wait to try it out (it's pretty far down the development list right now).
Is it coincidence that BOE could also mean 'Bane Of my Existance'?
-
Re: California Sales Tax Module
Due to needing it, I modified this..modification.. to store the relative tax rates along with the zip codes in the database, and automatically plug in the correct one in a customers order.
In the attached archive is the modified ot_zip_tax.php to go in the '/includes/modules/order_total' folder, as well as an SQL file that has the information for every zip code in California (I believe...).
So, replace the file, run the SQL statements, and you should be good.
-Joel
PS - I hope it was alright to modify this and share it, all copyright info was left intact. Just let me know if this isn't kosher.
PPS - I'm not really a PHP coder, but it worked fine in my store.
-
1 Attachment(s)
Re: California Sales Tax Module
Heh, forgot to attach. Here ya go :lookaroun
-
Re: California Sales Tax Module
CFE, great job on the mod. I did work on similar mod and worked but yours is a cleaner implementation. I could share my sql which has more zip entries and tax rates (ie. i noticed you didn't include 8.275%, 7.875%)
Again, nice work!
-
1 Attachment(s)
Re: California Sales Tax Module
Whoops, here is the sql I mentioned about.
Disclaimer: The file is 'Use as is'. :smile:
-
Re: California Sales Tax Module
Thx woogle, glad it worked for you.
Where did you get your zips?
-
Re: California Sales Tax Module
How is this different from the old zip file? I still have the old zip file on my site. Everything in my zip code gets charged 7.75% and every other city in California 7.25% out of state no tax...
-
Re: California Sales Tax Module
cfe,
I got them via melissa data
-
Re: California Sales Tax Module
wickedstangs,
cfe's mod determines the appropriate tax rates via a zip code-based lookup table. The lookup table is created using BOE's publication of CA District Taxes as a reference.
-
Re: California Sales Tax Module
Quote:
Originally Posted by
w00gle
Oh that is cool thanks for the info..
-
Re: California Sales Tax Module
Does this work with 1.3.8?
-
Re: California Sales Tax Module
This question was asked previously but I think not answered.
Does anyone know if this will work with NY State?
Has anyone been successful in implementing this plugin for NY?
Thanks.
-
Re: California Sales Tax Module
Just wandered into this thread ... not sure which version in these 4 pages to download/use? Thanks SO much to the talented folks who have developed these mods ... can't wait to implement, but want to be sure I'm using the right one :)
-
Re: California Sales Tax Module
We are an Ohio company with a presence in CA. Is it possible to use this module still? What would we need to modify in order to make it work correctly? Thanks in advance.
-
Re: California Sales Tax Module
After a few rounds of email to Adam Lieberman who wrote the QuickBooks Integration module (QBI), I would like to share my findings for those store owners with a business presence in California.
If you ship your products from your home or from a sales/shipping office in California using a carrier (FedEx, UPS) to do the pickup and delivery, you could save yourself a lot of complicated processing both in Zen Cart as well as in QuickBooks and also be BOE compliant with your CA sales tax returns.
Stating that your company ships FOB Shipping Point means that the customer assumes title to the product at the point that the carrier picks up the order for shipping. This also means that you must charge the customer the CA sales tax based on your shipping location -- not the customers shipping destination. One tax rate (for your shipping office / store location in CA) would then apply to all online sales inside CA. Of course you would not need to charge sales tax to customers outside of CA (if you only have a presence in CA).
You have another benefit with FOB Origin. If there is damage to the products in transit, the customer claims directly from the carrier without your intervention as the title to the goods has passed to the customer upon pickup by the carrier.
It would always be good customer service to help your customer with their claim.
It is also important when you have free shipping, that FOB Shipping Point is replaced or supplemented by the International Commerce term (Incoterm) "Free Shipping FCA".
All these terms can be easily researched. Please feel free to check this out with your accountant, commerical attorney as well as with BOE.
I hope this helps to uncomplicate a really complicated CA sales tax situation.
Richard.
-
Re: California Sales Tax Module
Can someone explain how i open this file (can i select word to open it) and then where exactly do i go install it? (new to this)
i REALLY need this please help/
i read the readme.. but im still confused:no:
-
Re: California Sales Tax Module
Quote:
Originally Posted by
chachab
Can someone explain how i open this file (can i select word to open it) and then where exactly do i go install it? (new to this)
i REALLY need this please help/
i read the readme.. but im still confused:no:
Step 1. I use WINRAR to open it and extract it to my HD.
Step 2. I use CONtext to Edit it.
Step 3. And to upload it to my server, I use FileZilla.
All Free stuff on the WWW.:clap:
-
Re: California Sales Tax Module
it took me a while but i finally got it. i was not understanding how to upload the database to myphp .. but FINALLY!
i REALLY appreciate peoples help!!!
thanks!
-
Re: California Sales Tax Module
Quote:
Originally Posted by
cfe
Heh, forgot to attach. Here ya go :lookaroun
Quote:
Originally Posted by
w00gle
Whoops, here is the sql I mentioned about.
Disclaimer: The file is 'Use as is'. :smile:
All, its been awhile since I installed this.. Do you have a step by step...?
-
Re: California Sales Tax Module
just what i was looking for.
has the zip codes been updated for the new April 2009 tax rate increases?
-
Re: California Sales Tax Module
Quote:
Originally Posted by
lincomatic
Oops! Sorry I left some debug messages in scl-zip-tax-v2.zip... but for some strange reason I can't edit my previous posts. So here is it again, w/o the debugs.
Does this wonderful program work with the latest version of Zen Cart V1.3.8?
-
Re: California Sales Tax Module
According to the BOE, California sales tax is charged based on the location where the goods change hands. If you ship them, tax is calculated on your location, not the customer's. Charge the customer location tax only if you make the delivery in person.
-
Re: California Sales Tax Module
Quote:
Originally Posted by
cmhdesign
According to the BOE, California sales tax is charged based on the location where the goods change hands. If you ship them, tax is calculated on your location, not the customer's. Charge the customer location tax only if you make the delivery in person.
**If you ship outside of your district, that you are suppose to charge the State wide sales tax rate of 8.25%** If I ship in my district (San Diego, then I charge 8.75%.
Straight from the my BOE correspondence....
In summary, based on the above citations and the information provided, if your business is located in San Diego County, you are considered engaged in business in San Diego County. Therefore, when you make a sale to a customer and you ship or deliver the property to the customer anywhere in San Diego County, you are responsible for reporting the 8.75% tax rate. However, if you ship or deliver the property to the customer in another district in which you are not considered engaged in business as defined above, you are required to report the transactions (sales) taxes of 8.25%, but you are not required to report the district use taxes of .50%. As such, it is false to say that if your business is located in San Diego, the 8.75% San Diego tax rate applies to all your sales shipped or delivered throughout California. The tax rate that applies is based on where the product is delivered to the customer.
-
Re: California Sales Tax Module
So if you do it this way, you don't need the mod rigth. I created a zone for CA and apply it to 8.20%. Does that sound right?
Quote:
Originally Posted by
tj1
Thanks, this is very nice. I'll check it out right away.
Just one thing, you mention "any tax that you don't collect is the responsibility of the buyer ... ", I think that's wrong, it's the other way around. You (the seller) are resposible for paying sales tax to the BOE, you are allowed, but not required, to pass this cost on to the customer, but you are the one ultimately responsible for making sales tax payments.
I just charge 8.25% for all of California. The BOE does allow this and doesn't mind, it just says if you over-collected just send it all to them. I think most companies do it this way, it's just too much of a hassle figuring it out for all counties/districts unless you only deal withing your local zone.
-
Re: California Sales Tax Module
Hmmm...I hear a lot of different things about CA sale collection. But you sound convincing so when you say "BOE correspondence"
is it from a BOE publication. If yes can you give me a number. I just want to be sure.
Also for those who use zip code for CA sale tax rate, on Application 17 it stated that it maybe incorrect to use address (zip code) to determine a sale tax.
Quote:
Originally Posted by
mtmnet
**If you ship outside of your district, that you are suppose to charge the State wide sales tax rate of 8.25%** If I ship in my district (San Diego, then I charge 8.75%.
Straight from the my BOE correspondence....
In summary, based on the above citations and the information provided, if your business is located in San Diego County, you are considered engaged in business in San Diego County. Therefore, when you make a sale to a customer and you ship or deliver the property to the customer anywhere in San Diego County, you are responsible for reporting the 8.75% tax rate. However, if you ship or deliver the property to the customer in another district in which you are not considered engaged in business as defined above, you are required to report the transactions (sales) taxes of 8.25%, but you are not required to report the district use taxes of .50%. As such, it is false to say that if your business is located in San Diego, the 8.75% San Diego tax rate applies to all your sales shipped or delivered throughout California. The tax rate that applies is based on where the product is delivered to the customer.
-
Re: California Sales Tax Module
Quote:
Originally Posted by
Angkorthom
Hmmm...I hear a lot of different things about CA sale collection. But you sound convincing so when you say "BOE correspondence"
is it from a BOE publication. If yes can you give me a number. I just want to be sure.
Also for those who use zip code for CA sale tax rate, on Application 17 it stated that it maybe incorrect to use address (zip code) to determine a sale tax.
There is a TON of confusion which is why I contacted the BOE and got something in writing.
If you are a small business with one business location you have to charge the District sales tax rate (example: San Diego 8.75%) when shipping to customers in your District/county (San Diego).
When shipping to customers in California that are outside of your District (example: outside San Diego county) you only have to charge the State Wide rate of 8.25%.
What a mess! No wonder California had budget problems.
...Or.... you can do like some folks and just charge 8.75% to everyone in California and hand it all over to the BOE to keep things simple.
-
Re: California Sales Tax Module
mtmnet, thank you so much for the clearification. I tried to call BOE brand in San Jose this morning and was put on hold for about an hour. I hanged up! I agreed with you about the mess in CA and I agree with somone said in a diferent thread that if CA cares about collecting sales why they don't provide API.
For my shop, I'll just use 8.25% for everybody in CA. If someone in my location, I'll pay the difference to make thing simple for now.
-
Re: California Sales Tax Module
So Angkorthom, if you charge one rate to everybody, how are you justify charging more sales tax to the customer than what he/she should pay?
I am in the same boat and want to avoid this mess of cities and counties.
I know there was no way till 2009 but recently is there any automated way of populating the sales tax districts, counties and cities in Zen Cart DB?
-
Re: California Sales Tax Module
I hope that everyone is not OVERCHARGING tax (and making your sales and use tax returns more complex).
BOE Publication 105 states that district tax only needs to be paid if you are ENGAGED IN BUSINESS IN THAT DISTRICT. Otherwise, you may use the statewide rate of 7.25.
So, if you are engaged in business in San Diego County, which has a district tax, and you ship something to somewhere outside of San Diego County (but in California), you can charge the statewide rate of 7.25. The purchase is responsible for the district use tax. However, if the retailer collects the district tax, they must report and remit it to the state.
-
Re: California Sales Tax Module
If I sell images (jpg/psd/png etc) that are not shipped, I think I need to charge tax to the customers who live in CA, is that correct? If so, how do I charge just those customers and not everyone?
-
Re: California Sales Tax Module
ahhh california.. not sure why anyone still live there.. but i digress.. does this module work for companies outside california that would need to collect CA taxes?