I've got a weird case where I use the QuoteAgent to get the discount perfent given on a quotealternative. The problem is that the DiscountPercent method on the QuoteAlternative gives wrong decimal precision - but only in production, not in test.
I'm using CRMScript, but assume I would have gotten same issue had I used same classes/methods via C#.
The problem can be visualized using this CRMScript:
Integer quoteAlternativeId = 341;
NSQuoteAlternative alt = qa.GetQuoteAlternative(quoteAlternativeId);
printLine("From NSQuoteAlternative: " + alt.GetDiscountPercent().toString(8));
se.addCriteria("QuoteAlternative.quotealternative_id", "equals", quoteAlternativeId.toString());
for (se.execute(); !se.eof(); se.next())
printLine("From SearchEngine: " + se.getField("QuoteAlternative.DiscountPercent"));
When I use the GetDiscountPercent on the NSQuoteAlternative I get one answer, and if I look up the value in the database directly using SearchEngine I get different answer:
The weird thing is that in the TEST environment I get the correct precision when using same script.
What could cause GetDiscountPercent to round off the discount like that? Is there a setting somewhere for this?