How compute and apply discount automatically based on the pricelist?