I have a database for orders and production
I will explain everything in detail:
The database contains 4 tables
1- tbl_order (OrderID PK , OrderNo, Employee_ID, Customer_ID, OrderDate)
2- tbl_Orderdetail s( OrderDetailID, OrderID FK, ProductID, Quantity , Date Required, UnitPrice)
3- tbl_Production (BatchNo, Employee_ID, DateEntered)
4- tbl_ProductionD etail ( BatchNO, Date, Machine_ID, Employee_ID, Product_ID, Quantity, Defective, OvertimeQuantit y, OvertimeDefecti ve)
in the second table (tbl_Orderdetai ls) I made the field orderdetailID as PK in order to allow duplicating the product
because the order will be like that:
Product Product quantity daterequired
So I can have the same product more than one time but the daterequired will be different.
Assume that I have this order
the order will be entered into the database like that above-shown
and the production department will receive the same order to carry it out
and the will enter units produced into the database like that:
so I need to develop a form to calculate how many units need to be produced for which date ( the daterequired that mentioned in the order):
in other words i want to compare between the production and orders depending on the order date required of every product, it's now 8 days looking for any piece of information to make this query
I will explain everything in detail:
The database contains 4 tables
1- tbl_order (OrderID PK , OrderNo, Employee_ID, Customer_ID, OrderDate)
2- tbl_Orderdetail s( OrderDetailID, OrderID FK, ProductID, Quantity , Date Required, UnitPrice)
3- tbl_Production (BatchNo, Employee_ID, DateEntered)
4- tbl_ProductionD etail ( BatchNO, Date, Machine_ID, Employee_ID, Product_ID, Quantity, Defective, OvertimeQuantit y, OvertimeDefecti ve)
in the second table (tbl_Orderdetai ls) I made the field orderdetailID as PK in order to allow duplicating the product
because the order will be like that:
Product Product quantity daterequired
So I can have the same product more than one time but the daterequired will be different.
Assume that I have this order
Code:
Product Quantity Date Required T.V 10 1/6/2010 T.V 3 1/8/2010 VCR 17 1/15/2010 Camera 4 1/14/2010
and the production department will receive the same order to carry it out
and the will enter units produced into the database like that:
Code:
Product Quantity Date T.V 2 1/7/2010 VCR 6 1/2/2010 Camera 1 1/10/2010 TV 2 1/4/2010 Camera 2 1/5/2010
in other words i want to compare between the production and orders depending on the order date required of every product, it's now 8 days looking for any piece of information to make this query
Comment