I am trying to design a db that handles a daily stock summary.
Tables:
tblPurchases
tblSales
tblStockSummary
tblStocksummary:
Date | Product Name | Start Stock | Tot Purchased | Tot Sold | End Stock
I am trying to figure out whats the best way round this.
1st Idea. to create some sort of query or code that when run would total puchases of each product for the day then add the results to the stock summary table and then do the same for the sales. It would then calculate the end stock. The end stock would then be copied to the start stock for the next day. There are always only going to be three products.
I need this as there has to be record of Daily Stock.
If this is the correct way about this, i dont have a clue about how to write the query or coding can anyone suggest any ideas or any examples i can look at. Thanks
Tables:
tblPurchases
tblSales
tblStockSummary
tblStocksummary:
Date | Product Name | Start Stock | Tot Purchased | Tot Sold | End Stock
I am trying to figure out whats the best way round this.
1st Idea. to create some sort of query or code that when run would total puchases of each product for the day then add the results to the stock summary table and then do the same for the sales. It would then calculate the end stock. The end stock would then be copied to the start stock for the next day. There are always only going to be three products.
I need this as there has to be record of Daily Stock.
If this is the correct way about this, i dont have a clue about how to write the query or coding can anyone suggest any ideas or any examples i can look at. Thanks