Commit 648b5a62 authored by caluka's avatar caluka

Exponential Quantity set as decimal for requirement wizard transaction


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96198 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0b6b5c78
......@@ -12,6 +12,8 @@ import ibase.webitm.utility.ITMException;
import ibase.system.config.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import javax.naming.InitialContext;
import javax.ejb.Stateless;
......@@ -220,7 +222,8 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
valueXmlString.append("<item_descr protect = '1'>").append("<![CDATA[" + rs.getString("DESCR") + "]]>").append("</item_descr>\r\n");
valueXmlString.append("<unit protect = '1'>").append("<![CDATA[" + rs.getString("UNIT") + "]]>").append("</unit>\r\n");
valueXmlString.append("<no_of_batch protect = '1'>").append("<![CDATA[" + batchReq + "]]>").append("</no_of_batch>\r\n");
valueXmlString.append("<quantity>").append("<![CDATA[" + rs.getDouble("QUANTITY") + "]]>").append("</quantity>\r\n");
//valueXmlString.append("<quantity>").append("<![CDATA[" + rs.getDouble("QUANTITY") + "]]>").append("</quantity>\r\n");
valueXmlString.append("<quantity>").append("<![CDATA[" + getRequiredDecimal(quantity, 3) + "]]>").append("</quantity>\r\n");
valueXmlString.append("<bom_code>").append("<![CDATA[" + rs.getString("BOM_CODE") + "]]>").append("</bom_code>\r\n");
valueXmlString.append("<mpsorder>").append("<![CDATA[" + rs.getString("MPSORDER") + "]]>").append("</mpsorder>\r\n");
valueXmlString.append("</Detail2>");
......@@ -1177,7 +1180,18 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
catch(Exception e){}
}
return tranId;
}//generateTranTd()
}//generateTranTd()
public String getRequiredDecimal(double actVal, int prec)//Added by chandrashekar on 28-08-14
{
String fmtStr = "############0";
String strValue = null;
if (prec > 0)
{
fmtStr = fmtStr + "." + "000000000".substring(0, prec);
}
DecimalFormat decFormat = new DecimalFormat(fmtStr);
return decFormat.format(actVal);
}
}
......
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