|
Decades ago I did something similar in which we had to figure taxes based on zip code of the customer, for a chain of retail stores ... if we had a store in a particular combination state-city-county then when someone ordered merchandise through our mail order operation or telephone call to HQ we had to charge them the same taxes as if they in that store, but if they in same state but a county in which we had no store, we only had to charge the state sales tax, and if sale to an address in a state where we had no store, then no such taxes. So the program to get from which zip code to which tax rate, like state rate + does that county have an add on & is there a city tax, and fortunately it all could be paid to the state, was basically dependent on data from the post office that told us which zip codes were which counties, and data from the state that told us which counties & cities had which add ons to the state rates. I had one table of zip codes, in which some were like the first 2-3 digits & the story on that prefix was valid until a later entry that might go 5 digits, so SETLL & READ gets you to the relevant zip code level of match. As I recall, there were some problems involving certain 5 digit zip codes that were shared by more than one county in which the 2 counties had different cumulative tax rates, so there had to be secondary subroutines to do something different for specific zip codes. The map of zip code to county was pretty static until post office split up some growing area, but the tax rates were very volatile with counties frequently getting adjusted rates, so there really needed to be a second table ... from zip code to county to current rules for that county, so when county rules change, update the county table, and leave the zip table alone. Al Macintyre ©¿© +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.