Query regarding the sale price per item in Sale Order
Hello friends,
This query might sound very basic, but I have some doubts about it.
I am starting to develop a small sale-order system for my own food business.
-> I have a Menu table with price for each item.
-> Now I want to make SaleOrders table and a child table OrderItems.
->In OrderItems I will pick up the price of each item from the reference of Menu table (I will setup the reference in OrderItems table).
Everything is fine according to me till here. Problem starts from here. In the future if I change the price of any item in the Menu table, it will make effect (change item price) in all the historical orders as well (since there is a reference to menu table in the OrderItems table).
So how do I go about this. I do not want the price to change for items in the historical orders, thus changing the total of all the historical orders and create problem in accounting. But I do want the new orders to pick up the latest price from the Menu table always.
Please help !!
8 replies
-
The only way I can think of right now is that the rate from the Menu table will only be copied to the Rate field in OrderItems table if the it is empty. It will only be empty for the first time when the OrderItem is being created in the SaleOrder table.
This way we can change the rate in the Menu table in the future and it will not affect the historical transactions.
Please let me know if I am using the right approach !!
-
Agree with you.
You want to copy the prices from the menu table into new form. That way you can freely alter the master table prices
see very quick sample !!!!
Content aside
- Status Answered
- 4 mths agoLast active
- 8Replies
- 52Views
-
4
Following