Math update for qty update hook