apply discount rules