invoice and discount

  • Thread starter Thread starter Frank Kraft
  • Start date Start date
F

Frank Kraft

hi there!



i´d like to ask for a suggestion how to create a database.. all clients got
an individual discount. the discounts value is a part of the table "clients".
the invoice amount is calculated with the individual discount. the problem:
what if the discount changes? .the amount of the invoices charged until then
would change as well!



does anybody has an idea how to solve this problem?



thanks



frank
 
The data in the invoice should not be dynamic but static based on data at the
time of the invoice. So if discount changed today it will not affect
incoices created yesterday.
 
What Karl meant is that you need to store the applicable DiscountRate with
the Invoice at the time the Invoice is created and then use this saved
DiscountRate for this Invoice for later processing.

This is one of the few cases where you need to store "seemingly" duplicated
data. It is not redundant, however, as you need to store historical data in
this case.

The other way is to store the history of DiscountRate (changes). This may
be more acceptable to the database purists but certainly a bit more complex
in processing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top