fixing sign of applying discount to total when computing subtotal