Also, if I add another subtotal between those two ...
# suitescript
a
Also, if I add another subtotal between those two discounts, everything calculates correctly.