Incorrect calculation of the total amount when having negative discount applied on the invoice

Order To Cash Version 8.41

Earlier, the total amount was not calculated correctly when invoices contained a negative discount.
This has now been fixed.