Fix calculations for Taxes after discounts.

#2347