in reply to Sales Tax Calculations in Perl

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.

Replies are listed 'Best First'.
Re^2: Sales Tax Calculations in Perl
by jhourcle (Prior) on Jan 16, 2007 at 18:05 UTC

    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

      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.

      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 ..
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: Sales Tax Calculations in Perl
by herveus (Prior) on Jan 17, 2007 at 12:42 UTC
    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.

    yours,
    Michael
A reply falls below the community's threshold of quality. You may see it by logging in.