Commit 8f529f54 authored by vvengurlekar's avatar vvengurlekar

CustItemUpdatePrc.java

CustomerItem.java - changes made to resolve number format exception


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@202818 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fc640311
...@@ -228,10 +228,12 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust ...@@ -228,10 +228,12 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust
integralQtyStr = genericUtility.getColumnValue("integral_qty", dom); integralQtyStr = genericUtility.getColumnValue("integral_qty", dom);
if ( integralQtyStr != null && integralQtyStr.trim().length() > 0 ) if ( integralQtyStr != null && integralQtyStr.trim().length() > 0 )
{ {
integralQty = Integer.parseInt(integralQtyStr); //changed by Varsha V on 29-06-19 to resolve number format exception
//integralQty =Integer.parseInt(integralQtyStr);
integralQty = Integer.parseInt(checkInteger(integralQtyStr));
} }
//Commented by Varsha Von 29-06-19
integralQty =Integer.parseInt(integralQtyStr); //integralQty =Integer.parseInt(integralQtyStr);
if(integralQty < 0) if(integralQty < 0)
{ {
errCode = "VT_QTY1MIN"; errCode = "VT_QTY1MIN";
...@@ -528,6 +530,11 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust ...@@ -528,6 +530,11 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust
} }
return msgType; return msgType;
} }
//Method added by Varsha V on 29-06-19
private String checkInteger(String input)
{
return (input == null || input.trim().length() ==0)? "0" : input;
}
} }
...@@ -134,7 +134,9 @@ public String process(Document headerDom, Document detailDom, String windowName, ...@@ -134,7 +134,9 @@ public String process(Document headerDom, Document detailDom, String windowName,
if(integralQty!=null && integralQty.trim().length()>0) if(integralQty!=null && integralQty.trim().length()>0)
{ {
intQty=Double.parseDouble(integralQty); //changed by Varsha V on 29-06-19 to resolve number format exception
//intQty=Double.parseDouble(integralQty);
intQty=Double.parseDouble(checkInteger(integralQty));
} }
...@@ -355,7 +357,11 @@ public String process(Document headerDom, Document detailDom, String windowName, ...@@ -355,7 +357,11 @@ public String process(Document headerDom, Document detailDom, String windowName,
} }
return input.trim(); return input.trim();
} }
//Method Added by Varsha V on 29-06-19
private String checkInteger(String input)
{
return (input == null || input.trim().length() ==0)? "0" : input;
}
......
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