View Full Version : best solution?

02-21-2003, 10:43 PM
I am hoping to prepare a list of the most feasable responses to the following situation. If anyone can please add suggestions that I have not already listed it would be greatly appreciated.

So the situation is:

- A database that handles customers and customer invoices.
- The invoice along with other data, includes the customers address.
- customer_1 changes their address, and the new address is updated in the database.
- customer_1 wants a copy of an invoice that just so happens to be from a date prior to when that customer moved.
- the invoice MUST print the customers old address, not the new one, because invoice data must not change from when the customer first recieved the invoice.
- the current system has no way of knowing customer_1 has changed thier address, because the customer table only holds the customers current address.

I have to rectify this situation, I have compliled the following
list of ways correcting for this instance. I was hoping on top of
what I listed here, that people would be able to offer their advise/

1) The simpilest way to make sure this does not happen, is to
have a hard copy of the invoice. (maybe even microfishe)

2) re-store a back-up of the database and print.

3) adjust the data model, so their is a customer_address_history
table, that notes customer address changes.

4) make a customer_invoice_detailed table that hold specific information relating to the invoice (include customer address).

5) ??

6) ???


Roy Sinclair
02-21-2003, 11:27 PM
The answer is a "Sales History" database where ALL current information from the various tables (customer, discounting, inventory...) used to make an invoice is salted away at the time of the transaction. In fact your invoicing process should create the "Sales History" and then use that information to create the printed copy making your reprint process essentially the same code.

I worked various parts of a system that did just that in my past life as a dinosaur tender.