update total price margin