Calculation of discounts and sale prices