Commit 28f79388 authored by msalla's avatar msalla

Receivables JV - Cheque amount to be protected

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@200804 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ef9786cc
package ibase.webitm.ejb.fin;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.sys.UtilMethods;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
......@@ -17,12 +10,23 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import javax.ejb.Stateless;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.sys.UtilMethods;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
@Stateless
public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, ReceiptAdvRemote
{
......@@ -220,6 +224,8 @@ conn = getConnection();
errFields.add(childNodeName.toLowerCase());
}*/
}
else
{
errCode = "VMTRANDT";
......@@ -2679,6 +2685,8 @@ conn = getConnection();
{
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
dateFormat1=new SimpleDateFormat(genericUtility.getApplDateFormat());
//Changes and Commented By Bhushan on 06-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
......@@ -2698,7 +2706,16 @@ conn = getConnection();
{
case 1:
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
// added by -Monika-13 MAY 2019-To make chq amount protected in Receivable JV
winName = getObjName(parentNode);
System.out.println( "winName :: " + winName );
//end
childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail1>");
childNodeListLength = childNodeList.getLength();
......@@ -2719,6 +2736,7 @@ conn = getConnection();
if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
{
tranType = genericUtility.getColumnValue("tran_type", dom);
//Added by Pavan R on 19/Feb/2K18[Start] entry_batch_no value is set to “NULL” in receipt table on edit mode
entryBtchNo = genericUtility.getColumnValue("entry_batch_no", dom);
//Added by Pavan R on 19/Feb/2K18[End]
......@@ -2815,6 +2833,17 @@ conn = getConnection();
}
System.out.println(" detail count [" + instrPerSlip + "] valueXmlString [" + valueXmlString.toString() + "]" );
//changes by-MOnika-14-may-2019
if("w_receivables_jv".equalsIgnoreCase(winName))
{
chequeAmt = doublevalue(genericUtility.getColumnValue("chq_amt", dom));
valueXmlString.append("<chq_amt protect=\"1\">").append("<![CDATA[" + chequeAmt + "]]>").append("</chq_amt>");
}
}
else if (currentColumn.trim().equalsIgnoreCase("itm_default"))
{
......@@ -2828,6 +2857,17 @@ conn = getConnection();
valueXmlString.append("<exch_rate protect = \"0\">").append("<![CDATA["+""+"]]>").append("</exch_rate>");
valueXmlString.append("<site_code >").append("<![CDATA[" + loginSite + "]]>").append("</site_code>");
setNodeValue(dom, "site_code", getAbsString(siteCode));
//changes by-MOnika-14-may-2019
if("w_receivables_jv".equalsIgnoreCase(winName))
{
chequeAmt = doublevalue(genericUtility.getColumnValue("chq_amt", dom));
valueXmlString.append("<chq_amt protect=\"1\">").append("<![CDATA[" + chequeAmt + "]]>").append("</chq_amt>");
}
}
else if (currentColumn.trim().equalsIgnoreCase("tran_date"))
{
......@@ -4729,4 +4769,32 @@ conn = getConnection();
return retVal;
}
// method getobj added-Monika-13-MAY-2019-To make chq amount protected in Receivable JV
private String getObjName(Node node) throws Exception
{
String objName = null;
NodeList nodeList = null;
Node detaulNode = null;
Node detailNode = null;
nodeList = node.getChildNodes();
NamedNodeMap attrMap = node.getAttributes();
objName = attrMap.getNamedItem( "objName" ).getNodeValue();
/*
for(int ctr = 0; ctr < nodeList.getLength(); ctr++ )
{
detailNode = nodeList.item(ctr);
if(detailNode.getNodeName().equalsIgnoreCase("attribute") )
{
objName = detailNode.getAttributes().getNamedItem("objName").getNodeValue();
}
}
*/
return "w_" + objName;
}
}
\ No newline at end of file
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