updatd pivot query to change quantity on hand logit