Commit 94e0252c authored by skale's avatar skale

Changes in itemchange for showing credit limit.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91156 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 086b73b4
......@@ -26,6 +26,7 @@ import java.sql.Timestamp;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import java.text.DecimalFormat;
import javax.ejb.Stateless; // added for ejb3
......@@ -34,6 +35,7 @@ import javax.ejb.Stateless; // added for ejb3
public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderFormRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
DecimalFormat df = new DecimalFormat( "##.00" );
/*public void ejbCreate() throws RemoteException, CreateException
{
//System.out.println("<======= SOrderForm DISPLAY IS IN PROCESS ! \n Welcome!========>");
......@@ -1873,7 +1875,7 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
{
custName = rs.getString(1) == null ? "" : rs.getString(1);
transMode = rs.getString(2) == null ? "" : rs.getString(2);
creditLmt = rs.getString(3) == null ? "" : rs.getString(3);
creditLmt = rs.getString(3) == null ? "0" : rs.getString(3);
addr1 = rs.getString(4) == null ? "" : rs.getString(4);
addr2 = rs.getString(5) == null ? "" : rs.getString(5);
addr3 = rs.getString(6) == null ? "" : rs.getString(6);
......@@ -1905,7 +1907,14 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
pstmt.close();
pstmt = null;
rs = null;
valueXmlString.append("<st_cust_outs>").append("Customer Outstanding : Rs.").append("<![CDATA["+totAmtAdjAmt.trim()+"]]>").append("</st_cust_outs>");
double creditLmtDbl = Double.parseDouble(creditLmt.trim());
double totAmtAdjAmtDbl = Double.parseDouble(totAmtAdjAmt.trim());
creditLmtDbl = Double.parseDouble(df.format(creditLmtDbl));
totAmtAdjAmtDbl = Double.parseDouble(df.format(totAmtAdjAmtDbl));
//valueXmlString.append("<st_cust_outs>").append("Customer Outstanding : Rs.").append("<![CDATA["+totAmtAdjAmt.trim()+"]]>").append("</st_cust_outs>");
valueXmlString.append("<st_cr_limit>").append("<![CDATA["+creditLmtDbl+"]]>").append("</st_cr_limit>");
valueXmlString.append("<st_cust_outs>").append("<![CDATA["+totAmtAdjAmtDbl+"]]>").append("</st_cust_outs>");
valueXmlString.append("<customer_addr1>").append("<![CDATA["+addr1.trim()+"]]>").append("</customer_addr1>");
valueXmlString.append("<customer_addr2>").append("<![CDATA["+addr2.trim()+"]]>").append("</customer_addr2>");
valueXmlString.append("<customer_addr3>").append("<![CDATA["+addr3.trim()+"]]>").append("</customer_addr3>");
......@@ -2116,7 +2125,7 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
{
custName = rs.getString(1) == null ? "" : rs.getString(1);
transMode = rs.getString(2) == null ? "" : rs.getString(2);
creditLmt = rs.getString(3) == null ? "" : rs.getString(3);
creditLmt = rs.getString(3) == null ? "0" : rs.getString(3);
addr1 = rs.getString(4) == null ? "" : rs.getString(4);
addr2 = rs.getString(5) == null ? "" : rs.getString(5);
addr3 = rs.getString(6) == null ? "" : rs.getString(6);
......@@ -2148,7 +2157,14 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append("<st_cust_outs>").append("Customer Outstanding : Rs.").append("<![CDATA["+totAmtAdjAmt.trim()+"]]>").append("</st_cust_outs>");
double creditLmtDbl = Double.parseDouble(creditLmt.trim());
double totAmtAdjAmtDbl = Double.parseDouble(totAmtAdjAmt.trim());
creditLmtDbl = Double.parseDouble(df.format(creditLmtDbl));
totAmtAdjAmtDbl = Double.parseDouble(df.format(totAmtAdjAmtDbl));
//valueXmlString.append("<st_cust_outs>").append("Customer Outstanding : Rs.").append("<![CDATA["+totAmtAdjAmt.trim()+"]]>").append("</st_cust_outs>");
valueXmlString.append("<st_cr_limit>").append("<![CDATA["+creditLmtDbl+"]]>").append("</st_cr_limit>");
valueXmlString.append("<st_cust_outs>").append("<![CDATA["+totAmtAdjAmtDbl+"]]>").append("</st_cust_outs>");
valueXmlString.append("<customer_addr1>").append("<![CDATA["+addr1.trim()+"]]>").append("</customer_addr1>");
valueXmlString.append("<customer_addr2>").append("<![CDATA["+addr2.trim()+"]]>").append("</customer_addr2>");
valueXmlString.append("<customer_addr3>").append("<![CDATA["+addr3.trim()+"]]>").append("</customer_addr3>");
......
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