Commit 7ad84b11 authored by steurwadkar's avatar steurwadkar

changes made to handle "ROUND" function in expression

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176418 ce508802-f39f-4f6c-b175-0d175dae99d5
parent faa93165
...@@ -191,6 +191,16 @@ public class PricelistGenEJB extends ValidatorEJB ...@@ -191,6 +191,16 @@ public class PricelistGenEJB extends ValidatorEJB
} }
else if("E".equalsIgnoreCase(varSrc)) else if("E".equalsIgnoreCase(varSrc))
{ {
if( varExpr.indexOf("ROUND(") != -1 )
{
varExpr = varExpr.replaceAll("ROUND\\(", "Math.round(");
System.out.println("in 1st if updated varExpr["+varExpr+"]");
}
else if( varExpr.indexOf("ROUND (") != -1 )
{
varExpr = varExpr.replaceAll("ROUND \\(", "Math.round(");
System.out.println("in 2nd if updated varExpr["+varExpr+"]");
}
finalRate = String.valueOf(exprsEngine.eval(varExpr)); finalRate = String.valueOf(exprsEngine.eval(varExpr));
if("NaN".equalsIgnoreCase(finalRate)) if("NaN".equalsIgnoreCase(finalRate))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment