Commit 92df2cfe authored by caluka's avatar caluka

Changes done in E-Collection for customer code condition added for amount


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97482 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ef09f789
...@@ -350,6 +350,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E ...@@ -350,6 +350,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
refSer = genericUtility.getColumnValue("ref_ser",dom); refSer = genericUtility.getColumnValue("ref_ser",dom);
refNo = genericUtility.getColumnValue("ref_no",dom); refNo = genericUtility.getColumnValue("ref_no",dom);
lineNo = genericUtility.getColumnValue("line_no",dom); lineNo = genericUtility.getColumnValue("line_no",dom);
custCode = this.genericUtility.getColumnValue("cust_code", dom1);
if (rcpAmtStr != null && rcpAmtStr.trim().length() > 0) if (rcpAmtStr != null && rcpAmtStr.trim().length() > 0)
{ {
try try
...@@ -368,10 +369,11 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E ...@@ -368,10 +369,11 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
sql = "SELECT (TOT_AMT - ADJ_AMT) AS AMT FROM RECEIVABLES WHERE TRAN_SER = ? AND REF_NO = ? " ; sql = "SELECT (TOT_AMT - ADJ_AMT) AS AMT FROM RECEIVABLES WHERE TRAN_SER = ? AND REF_NO = ? AND cust_code = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,checkNull(genericUtility.getColumnValue("ref_ser",dom))); pstmt.setString(1,checkNull(genericUtility.getColumnValue("ref_ser",dom)));
pstmt.setString(2,checkNull(genericUtility.getColumnValue("ref_no",dom))); pstmt.setString(2,checkNull(genericUtility.getColumnValue("ref_no",dom)));
pstmt.setString(3,custCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next()) if( rs.next())
{ {
...@@ -520,7 +522,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E ...@@ -520,7 +522,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
int currentFormNo =0, childNodeListLength=0; int currentFormNo =0, childNodeListLength=0;
String columnValue=""; String columnValue="";
String loginSite="",loginSiteDesc="",siteCodeDesc=""; String loginSite="",loginSiteDesc="",siteCodeDesc="",hdrCustCode="",hdrSiteCode="";
String bankCode="",siteCode="",custCode="",bankName="",custName="",refNo="",refSer=""; String bankCode="",siteCode="",custCode="",bankName="",custName="",refNo="",refSer="";
double rcpAmt1=0; double rcpAmt1=0;
...@@ -676,13 +678,18 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E ...@@ -676,13 +678,18 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
System.out.println("currentColumn[" + currentColumn + "] ==> '" + columnValue + "'"); System.out.println("currentColumn[" + currentColumn + "] ==> '" + columnValue + "'");
if ( currentColumn.trim().equalsIgnoreCase("itm_default") ) if ( currentColumn.trim().equalsIgnoreCase("itm_default") )
{ {
hdrCustCode = this.genericUtility.getColumnValue("cust_code", dom1);
hdrSiteCode = this.genericUtility.getColumnValue("site_code", dom1);
valueXmlString.append("<line_no__ref><![CDATA[" ).append("1").append( "]]></line_no__ref>\r\n"); valueXmlString.append("<line_no__ref><![CDATA[" ).append("1").append( "]]></line_no__ref>\r\n");
//valueXmlString.append("<udf_str1><![CDATA[").append( hdrSiteCode ).append("]]></udf_str1>\r\n");
//valueXmlString.append("<udf_str2><![CDATA[").append( hdrCustCode ).append("]]></udf_str2>\r\n");
}else if( currentColumn.trim().equalsIgnoreCase( "ref_no" ) ||currentColumn.trim().equalsIgnoreCase( "ref_ser" ) ) }else if( currentColumn.trim().equalsIgnoreCase( "ref_no" ) ||currentColumn.trim().equalsIgnoreCase( "ref_ser" ) )
{ {
refNo = checkNull(genericUtility.getColumnValue("ref_no",dom)); refNo = checkNull(genericUtility.getColumnValue("ref_no",dom));
refSer = checkNull(genericUtility.getColumnValue("ref_ser",dom)); refSer = checkNull(genericUtility.getColumnValue("ref_ser",dom));
sql = "SELECT (TOT_AMT - ADJ_AMT) AS AMT FROM RECEIVABLES WHERE TRAN_SER = ? AND REF_NO = ? "; sql = "SELECT (TOT_AMT - ADJ_AMT) AS AMT FROM RECEIVABLES WHERE TRAN_SER = ? AND REF_NO = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refSer); pstmt.setString(1, refSer);
......
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