### Title

Calculation to correct a double negitive

### Post

Below is my calculation. If the in_amount is negative it doubles...

(in_amount = - 13.28) - (inpaidamount = 13.28) = - 26.53 not 0.

What is the best way to fix the calculation so it accommodates a negative amount?

If ( IN_isDLS ;

Round ( (IN_amount - INPaidAmount);2);

Round ( Invoice::INRemaining ; 2 )

)

In terms of the mathematics, -13.28 - 13.28 SHOULD result in a value of -26.53, not zero.

-13.28 + 13.28 = 0

13.28 - 13.28 = 0

So if -25.53 is not the expected value, you need to figure out if the error is that the first term should not be negative or if you should not be subtracting the second term.