I have two tables one is for Egg sales to customers and another has a list of prices.
Everything is working perfectly except when I update the price list, when I update the price in pricelist I don't want the calculated price in old records to change. But in my case if I update the pricelist, old entries also change which is not correct for payments already done
Example
- **price_type** **price_amount**
big_eggs_tray 500
small_eggs_tray 250
and say I do a sale of 2 eggs to my customer. Which makes my sales table look like this
id customer_name price_type eggs/trays total amount_paid remaining
11 Bob big_eggs_tray 2 1000 250 750
Now when I update the price list table I don't want my old records to change. how do I achieve this.
Please help my application is all done but I have run into this bug on testing phase. I'm using SQL Server and ASP.NET