Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sales Tax Calcs and I love NY...
Message
 
À
04/06/2002 08:33:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00664392
Message ID:
00664438
Vues:
27
Jim;

I have two major applications with a similar requirement. One is for Canada and the other California. California and New York are similar in what they tax and other details and yet each is unique. My solution is much like yours as it is easy to maintain by using procedural code, OOP and is table driven. I have an interface for the user to easily modify values. What a pain for the user!

In addition we have many business rules as the client is the State of California. I think they make up their own laws and rules as they make a purchase! He,he,he. :)

58 counties, hundreds of cities and towns and each with their own tax structure. Some items tax others not taxed. Sounds a lot like your app.

My suggestion: If it works invest your time in anything else. O.K., so I am lazy! :) Software is never finished. Do you find yourself waking up at 2 AM and saying to yourself, "Gee, that app I delivered 2 years ago - I just thought of a really cool way to do something"! I gave up such thoughts long ago and look to the future and anything that is not concerned with programming! :)

Tom


>I have a client that is moving a VFP6 app from a local to a regional level, and now requires an extension to handle an additional level of tax calculation. Any pointers to a better solution I am more than willing to consider. Table structure changes and rules are allowed :>)
>
>As of now, I have (3) numerics holding state, county, and local tax rates. To deal with clothing sales, we also have (3) logicals to determine the exempt status, .T. indicating that clothing is exempt in this jurisdiction. To add to my grief, NYS does not exempt any one item >$110. Up to this point, I have been handling it similar to the below pseudocode:
>
>IF saleitem >$110
>  totaltaxrate = statetax+countytax
>  do_the_calc_and_storeit()
>ELSE
>  DO CASE
>    CASE state_exempt AND county_exempt
>      totaltaxrate = 0
>      do_the_calc_and_storeit()
>    CASE state_exempt AND !county_exempt
>      totaltaxrate = countytaxrate
>      do_the_calc_and_storeit()
>    CASE !state_exempt AND !county_exempt
>      totaltaxrate = statetaxrate + countytaxrate
>      do_the_calc_and_storeit()
>  ENDCASE
>ENDIF
>
>Adding the additional level for municipal/local makes this method seem very inefficient to me, and confusing to say the least. As the rates/rules change annually at a minimum, maintenance is not a major concern.
>
>Anyone have a better method?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform