dongxiangchan0743 2012-03-22 19:21
浏览 36
已采纳

销售税计算(城市限制与不在城市范围内)

I've been tasked with creating a tool to calculate sales tax. So I signed us up for a monthly update of all zip codes and their associated tax rates. The problem I'm running into is that in 1 zip code you may have some addresses that are in city limits (so you have to charge city sales tax) and another that is out of city limits (then you dont charge city sales tax). Every example of tax calculation I find is based off zip code...not necessarily street address. Can anyone provide me some insight on how I go about figuring out exact sales tax?

Update: This would be sales tax on a website and also a tool for salesman to reference when cutting quotes.

  • 写回答

2条回答 默认 最新

  • dsbiw2911188 2012-03-22 19:37
    关注

    At least one other similar situation you will encounter are census-designated places. These are usually smaller towns that share a common zip code with a larger area, but have their own town names unique from the main town. Typically, they also have different tax rates.

    This can be somewhat easy to solve. If the tax data file you purchased contains this data, you will get multiple tax rates back for the same zip code; each rate should have a different city name. In this case, you can provide the user with a drop-down list of town names and let them choose which one they live in, or you can compare the city they entered with the list you have and find the matching one (or provide the list if nothing matches).

    As for your main question, if an address is outside of the city limits, the only way you can get this information is probably through an address verification service which could tell you if the address was inside or outside of city limits. Short of this, there isn't much you can do.

    The safe bet is going to be to just charge the sales tax; some people living outside taxable areas may be used to this happening on other ecommerce sites that don't differentiate their address, but this could deter many customers as well, especially when they are placing large orders where they could save a significant amount of money on not paying tax.

    If you are dealing with regular returning customers, you could add a flag to their shipping address record that states if the address is in the taxable area. If not, don't charge tax. For new customers however, this would require that they communicate this to you, and that you verify it and update the database (not automatic).

    One such service that can provide detailed address information is Melissa Data. Using that address lookup example on their site, it will tell you if an address is within city or county limits. I believe they have a service you can pay for to run these address queries.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应