Subtracting values from a child table to a parent table using an update button

I have an inventory app with tables order,orderitems (the line items), products, locations, LocaitonProducts (This stores the inventory at each location, products are often large enough to be in multiple locations) the issue is when an order is finished I want to be able to have the user hit a button on the order that will update the LocationProducts table with by subtracting the OrderItems from the table from the LocationProducts table but I only want to subtract the values from that specific order. any advice?