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?