Calculating discounts and final prices