One of the web apps I'm working on has a fairly small web store / shopping cart. As the client company is physically located in CA and has a physical location there, they're required to collect CA sales tax on all orders shipped to locations in California.
For those who don't know, CA has some fairly complex sales tax rules where, essentially, any local group can create a "tax district" and leverage an extra few cents worth of sales tax on top of the state-wide base of 7.25%. (Usually less than 1% extra.) These districts don't have to map to any other legislative borders, so you can end up with half a city paying an extra .25% sales tax, for example.
Technically, the law only requires that you charge the sales tax rate in your location as a seller - so, if I have a store here in Sacramento, I only need to charge Sacramento sales taxes on all orders shipped.
However, for various accounting and tax declaration reasons, it's actually easier to charge the sales tax of the location the order is being shipped to. (Which means a different sales tax, potentially, on every single order.)
So - my question. Is anyone aware of any slick ways to calculate this? The data you need to actually do the work is all available in a variety of semi-useful formats at the state Board of Equalization website, and we're knocking together a widget that tries to figure out sales tax based on things like city name and zip code. But, I was wondering if anyone has come across any cool tools out there for solving this problem. (Or any tools at all, for that matter.)
(We're using VB and ASP.net, but I'd be interested in solutions for any language, mainly because I'm fascinated to see how other people have solved this.)
Addendum - answering some questions from below:
Tim asks how this can possibly be "easier." I'm told that doing sales tax this way makes filling out your tax return simpler. I'm bleary on the details, but as I understand it, if you don't charge the rate for the shipping location, you have to justify why you didn't for every single order at the end of the year - namely, you have to attest that no, we live here and not there, so we charge the rate here.
Whereas if you always charge the destination rate, you can (apparently) just put down the total amount of sales tax you collected for the whole year on one line, and say "sales tax was this much.
It would seem the state doesn't care which you do. So, by "easier," I really mean "easier for the accountants" - which is of course in no way easier for us here on the programming team.
Also, Schnapple's Texas story is a potential solution. (In fact, I pitched this very idea this morning.) CA really doesn't care if you overcharge sales tax, as long as you don't undercharge and hand over everything you collect. The problem here is, unlike Texas (apparently) vast swathes of CA are not in a special tax district. So, while we could charge the highest level for everyone (which I think is 8.75 at the moment), most of the customers would mind not playing their normal rate of 7.25. And I guess I can't blame them.