Jump to content

modify calculation for sales tax increase


muscovite
 Share

Recommended Posts

  • Newbies

I inherited a database to track departmental requisitions including a calculation to add sales tax to the sum of subtotal and shipping. The local sales tax increased from .078 to .079 the first of April. I would like to modify the calculation such that it calculates the correct sales tax going forward without changing the previous records. Can someone help me with the syntax? I am a machinist, not a developer.

The starting DEPT_REQ# for the new tax rate is 11507.

This is the existing calculation: Unstored,=Let([@Prior=If(  GetAsNumber(DEPT_REQ#)>10980; Shipping+Subtotal; Subtotal)]; If(IsEmpty(Override);@Prior*.078; Override))

Link to comment
Share on other sites

I would never hard code tax rate in to a calculation but rather in a tax rate table and a date it is in effect and lookup that rate when at the time you record is created. 

Link to comment
Share on other sites

I absolutely agree with @Ocean West about not hard-coding tax-rates into calculation formulas. Tax rates change over time, and you will find yourself modifying the formula again and again.

Since you rate yourself as a novice, you might just add a TaxRate field to your table, populate it with the value of 0.078 in all existing records, and make it auto-enter the value of 0.079. Then change the calculation formula to use TaxRate instead of .078 .

Make you sure to have a backup before you try this, in case you make a mistake.

At the next tax rate change, simply change the auto-entered value.

 

 

 

Edited by comment
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.