Fix calculations for Taxes after discounts.

#2290