Calculating discounts and tax