Re: Sales Tax Calculations in Perl
by Cabrion (Friar) on Jan 17, 2007 at 12:20 UTC
|
I went through a vendor selection process last year and we chose http://tax.cchgroup.com as our vendor. We didn't do the integration in Perl, but they had some decent web API's to do what you want. We ruled out Taxware based on cost.
This product handles as much level of detail as you want to get. As others have noted, taxation is a very complex thing to implement correctly. It's not just a per-state thing. You can't even rely on state->county->city to remain the same across states as some states don't recognize that heirarchy. Throw on top of that, the fact that different products (food, clothing, pharmaceuticals, etc.) can each be taxed at a different rate at any point in a state's heirarchy and it tends to get REALLY crazy.
| [reply] |
Re: Sales Tax Calculations in Perl
by bart (Canon) on Jan 16, 2007 at 17:33 UTC
|
Do you really need a CPAN module? That seems like overkill, the table I found isn't big.
Yes, all thanks to Google. You could look at the other results, too, there are a few interesting ones. | [reply] |
|
|
I've never had to implement it, but as I understand it, sales tax is much more complicated than that simple table can show.
Luckily, as starX has said, you're only obligated to deal with sales tax where you have a presence, as the states aren't allowed to tax interstate commerce. (Quill Corp. v. North Dakota, 112 S. Ct. 1904, 504 U.S. 298 (1992))
Some of the stranger tax rules in Washington, DC that I'm aware of:
- Although food sold in DC is normally tax-exempt, food that is sold ready-to-eat (eg, refrigerated 1L bottle of soda) qualifies as a 'snack' and is subject to restaurant tax (10%), not the normal sales tax (5.75%)
- For a week or two before school starts, school supplies and clothing under $100 (per item) are exempt from sales tax.
- A number of items are taxed on top of (in place of?) normal sales tax, eg, cigarettes and gasoline.
I've also heard of regions where towns have sales taxes on top of the state sales taxes, but I have no idea if this is true or not, and if it applies to items shipped out of the area
I'd highly suggest talking to a local accountant. I know the SSTP was supposed to take care of much of the problems, but I've never dealt with it (I had looked into dealing with sales taxes when it was still in a planning phase).
Update: In case I wasn't clear enough, the point of this is that there is a lot that I don't know about taxes, and I suggest people contact accountants in their area or someone qualified to advise them, rather than just use a table of taxes by state
| [reply] |
|
|
New York is an example of a state with a base, state-wide rate to which are added varying county rates and even some municipal rates.
Details: http://www.tax.state.ny.us/pdf/publications/sales/pub718_806.pdf
Note also that neither municipal nor county boundaries align perfectly with zip code boundaries.
My snail mail, for example, is directed to an adjacent town, which delivers on routes which span municipal boundaries.
| [reply] |
|
|
I've also heard of regions where towns have sales taxes on top of the state sales taxes
Counties can have their sales tax as well ..
| [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in.
|
|
|
Howdy!
Many states (Arizona and Ohio come to mind from personal experience)
allow counties to tack on a local surcharge, making the sales tax rate
vary by county. Allegheny (Pittsburgh) and Philadelphia counties in
Pennsylvania each charge an extra 1%, and the rules in Pennsylvania for
what item are and are not subject to sales tax can be tricky to understand.
Some states levy different tax rates on different sorts of consumer goods.
Yeah, it might make sense to bury the details in a module, where all the
really hairy bits can get hidden, but then you have to maintain that sucker
to keep up with changes in the tax laws. It's not pretty.
I suspect that things are a bit simpler in Europe in general and Belgium
in particular.
| [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Re: Sales Tax Calculations in Perl
by toma (Vicar) on Jan 17, 2007 at 08:22 UTC
|
| [reply] |
|
|
there are something like 28,000 tax jurisdictions in the USA
Wow. That's just plain retarded.
| [reply] |
|
|
Is there some upper bound that is not retarded? What is the maximum number of entities that you'd allow?
| [reply] |
|
|
|
|
|
Re: Sales Tax Calculations in Perl -- Bad news
by starX (Chaplain) on Jan 16, 2007 at 17:46 UTC
|
Sales tax happens at the state and county levels in the US, but as I understand the law here, you are only responsible for collecting sales taxes in states for which you have a presence. Meaning that if you have warehouse in New York and a contact center in California, you would need to charge sales tax for both New York and California, but wouldn't for, say, Wisconsin. Your customers are still responsible for paying the sales tax, they just need to report it on their annual forms.
My best suggestion would be to have someone in each of your locations run to the local corner store, buy a candy bar, and see what the local tax rate is from the sales receipt. That's what you'll need to charge, but again, only from customers who are ordering from a state where you have a presence.
Disclaimer: I am neither a lawyer nor a CPA. | [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Re: Sales Tax Calculations in Perl
by sharkey (Scribe) on Jan 19, 2007 at 06:59 UTC
|
I also confirm that sales taxes are a big mess, and all that expense to have Taxware's accountants sort it out for you is probably worth it if you have to charge taxes in every state.
We use Vertex where I work. Our current version is Oracle-based, but they support other platforms too. It is very expensive, but it works, decyphering all the state/country/city level tax rates. The send regular rate updates, and provide reports for auditing when the states call you on something.
Another complication not mentioned yet: at one time I had to alter our software to keep track of customers who lived in "unincorporated" areas of a county because they were complaining about being charged the city taxes.
| [reply] |
|
|
After seeing several postings about needing a inexpensive listing of sales tax rates, I created a listing which I sell at SalesTaxListing.com. Feel free to check it out and see if it meets your needs.
| [reply] |
Re: Sales Tax Calculations in Perl
by Moron (Curate) on Jan 18, 2007 at 12:45 UTC
|
According to one set of state guidelines I found: Non-resident companies relative to a jurisdiction, irrespective of Nexus, should assume that the buyer is responsible for making and paying the returns.
| [reply] |