UPDATE products._VPW
JOIN (
  SELECT products._VPW.MFG_SKU AS Location, SUM(orderdetails.Quantity) AS Total_Applied
  FROM orderdetails
  JOIN products.client_map
    ON orderdetails.ProductCode = products.client_map.productcode
  JOIN products._VPW
    ON products.client_map.PIN = products._VPW.MFG_SKU
  WHERE orderdetails.ProductNote LIKE '%STOCK%'
    AND orderdetails.ProductNote NOT LIKE '%STOCK OH%'
    AND orderdetails.QtyOnPackingSlip IN (999, 998)
    AND orderdetails.QtyOnHold = 0
  GROUP BY products._VPW.MFG_SKU
) AS JustApplied
ON products._VPW.MFG_SKU = JustApplied.Location
SET products._VPW.TX = products._VPW.TX - JustApplied.Total_Applied;