I have an inventory table (products, quantity, LastPurchasePrice)
I then have a PurchaseOrder table where I create new purchase orders, and a third table which contains the actual line items linked back to the PurchaseOrder.
Purchase order is created, line items added and then it needs to be approved.
At approval, I want to update the inventory and increase the quantity field by the approved PO and also update the lastPurchase price in the inventory table.