Calculating the discounted price of items