Hi, forum. Good day to you all.
I'm having some issues regarding the insertion of a Requisition details table into an Order details table. For me, a requisition is an internal move of my company, where you send a document to someone in another team who's meant to authorize the purchase of goods.
This is my case:
In order to avoid making several requisitions, one for every provider, the user creates ONE requisition in which he enters different kinds of items, specifying the provider of each item. Once finished (and authorized), the user would press a button to "send" all of these items to different purchase orders, one for every provider this time is OK. So, for short, here's an example:
Requisition 1:
Cereal box - 145 - Wallmart
Coffee bag - 160 - Wallmart
Sugar - 5 - CostCo
Is transformed into
Purchase Order 1 for Wallmart:
Cereal box - 145
Coffee bag - 160
Purchase Order 2 for Costco:
Sugar - 5
For this example, I have:
tbProviders(ProviderID, ProviderName),
tbProducts(ProductID, ProductName),
tbRequisitions(RequisitionID, RequisitionNumber),
tbRequisitionDetails(ReqDetailsID, ProductID*, Quantity, RequisitionID*),
tbOrders(OrderID, OrderNumber, ProviderID*),
tbOrderDetails(OrderDetailsID, ProductID*, Quantity,OrderID*)
where * = foreign keys
Can this be done in one move? If so, could you give me an example?
I'm having some issues regarding the insertion of a Requisition details table into an Order details table. For me, a requisition is an internal move of my company, where you send a document to someone in another team who's meant to authorize the purchase of goods.
This is my case:
In order to avoid making several requisitions, one for every provider, the user creates ONE requisition in which he enters different kinds of items, specifying the provider of each item. Once finished (and authorized), the user would press a button to "send" all of these items to different purchase orders, one for every provider this time is OK. So, for short, here's an example:
Requisition 1:
Cereal box - 145 - Wallmart
Coffee bag - 160 - Wallmart
Sugar - 5 - CostCo
Is transformed into
Purchase Order 1 for Wallmart:
Cereal box - 145
Coffee bag - 160
Purchase Order 2 for Costco:
Sugar - 5
For this example, I have:
tbProviders(ProviderID, ProviderName),
tbProducts(ProductID, ProductName),
tbRequisitions(RequisitionID, RequisitionNumber),
tbRequisitionDetails(ReqDetailsID, ProductID*, Quantity, RequisitionID*),
tbOrders(OrderID, OrderNumber, ProviderID*),
tbOrderDetails(OrderDetailsID, ProductID*, Quantity,OrderID*)
where * = foreign keys
Can this be done in one move? If so, could you give me an example?