Hello aware_support,
Thanks so much for the prompt response. Please allow me to clarify a simplified scenerio.
This is an example of typical invoicing application. Invoice no., Date, Purchase price, Sales Tax, and Total amount are the fields in INVOICE table.
I am thinking (maybe I am wrong) SALES_TAX table wil have Purchase_Amount, Tax_Rate columns that will be 'configured'.
Then, we have Invoice Form developed in some sort of Web Form. User enters all the data except, the 'Sales Tax' field is returned from a Database Query against the SALES_TAX query (am I right here?)
The result from the query will be inserted in the Invoice and printed for the customer.
Various three scenerios are as follows:
A. The Business Rules on June 15 are:
Sales Tax = 5% if Purchase Amount > $1000
Two customers make purchases of $500 and $1500 against invoice no. 1 and 2 on 15th June. What is the Total amount?
B. Rules change on July 4 to the following:
The government declares Independence Day Tax Holiday.
Sales Tax = 0 for all Purchase amounts
Two customers make purchases of $600 and $1600 against invoice no. 3 and 4 on 4th July. What is the Total amount?
C. Rules change on September 1 to the following:
Government decides to increase tax rate
Sales Tax = 7.5% if Purchase Amount > $1000 ELSE Sales Tax = 2%
Two customers make purchases of purchases of $500 and $2000 against invoice no. 5 and 6 on 4th July. What is the Total amount?
This is a very simplified situation but for the purpose of discussion, there will be 20 invoices per minute and the computation of SALES_TAX can have over 30 rules (You know the government 😉 the tax may be different based on item purchase, county, your race etc. etc.)
Thanks in advance for your response.