Commit 4061dc70 authored by ssalve's avatar ssalve

Sarita: Done changes for GTPL Point No. 416 on 03 JUL 18

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@187206 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 222b4375
...@@ -22,7 +22,7 @@ import java.rmi.RemoteException; ...@@ -22,7 +22,7 @@ import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import ibase.webitm.ejb.adm.*;
import org.w3c.dom.CDATASection; import org.w3c.dom.CDATASection;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
...@@ -2527,6 +2527,10 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -2527,6 +2527,10 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
// GenericUtility genericUtility = GenericUtility.getInstance(); // GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
String bankName=""; String bankName="";
//Added by sarita on 03 JUL 18 [START] => GTPL Issue Tracker No 416
AdmCommon admCommon = new AdmCommon();
String empAdvSchemeCd = "" , acctCodeLoan = "";
//Added by sarita on 03 JUL 18 [END] => GTPL Issue Tracker No 416
try try
{ {
//DriverITM changes to getConnction() by Pavan R //DriverITM changes to getConnction() by Pavan R
...@@ -2665,7 +2669,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -2665,7 +2669,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
valueXmlString.append("<rnd_off>").append("<![CDATA[" + payRndOff + "]]>").append("</rnd_off>"); valueXmlString.append("<rnd_off>").append("<![CDATA[" + payRndOff + "]]>").append("</rnd_off>");
valueXmlString.append("<rnd_to>").append("<![CDATA[" + 1 + "]]>").append("</rnd_to>"); valueXmlString.append("<rnd_to>").append("<![CDATA[" + 1 + "]]>").append("</rnd_to>");
} }
valueXmlString.append("<sundry_name>").append("<![CDATA[" + "" + "]]>").append("</sundry_name>"); valueXmlString.append("<sundry_name>").append("<![CDATA[" + "" + "]]>").append("</sundry_name>");
valueXmlString.append("<sundry_name_pay>").append("<![CDATA[" + "" + "]]>").append("</sundry_name_pay>"); valueXmlString.append("<sundry_name_pay>").append("<![CDATA[" + "" + "]]>").append("</sundry_name_pay>");
valueXmlString.append("<advance>").append("<![CDATA[" + "" + "]]>").append("</advance>"); valueXmlString.append("<advance>").append("<![CDATA[" + "" + "]]>").append("</advance>");
...@@ -2964,7 +2968,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -2964,7 +2968,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
netPsexc = (Double.parseDouble(netAmt)) * mexrate; netPsexc = (Double.parseDouble(netAmt)) * mexrate;
valueXmlString.append("<net_amt__bc>").append("<![CDATA[" + netPsexc + "]]>").append("</net_amt__bc>"); valueXmlString.append("<net_amt__bc>").append("<![CDATA[" + netPsexc + "]]>").append("</net_amt__bc>");
} }
else if(currentColumn.trim().equalsIgnoreCase("eff_date")) else if(currentColumn.trim().equalsIgnoreCase("eff_date"))
{ {
effDate = genericUtility.getColumnValue("eff_date", dom); effDate = genericUtility.getColumnValue("eff_date", dom);
...@@ -2983,6 +2987,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -2983,6 +2987,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
String lsSiteCodePay=""; String lsSiteCodePay="";
sundryCode = genericUtility.getColumnValue("sundry_code", dom); sundryCode = genericUtility.getColumnValue("sundry_code", dom);
sundryType = genericUtility.getColumnValue("sundry_type", dom); sundryType = genericUtility.getColumnValue("sundry_type", dom);
System.out.println("sundryCode ["+sundryCode+"] \t sundryType ["+sundryType+"]");
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = genericUtility.getColumnValue("site_code", dom);
valueXmlString.append("<sundry_type__pay>").append("<![CDATA[" + sundryType + "]]>").append("</sundry_type__pay>"); valueXmlString.append("<sundry_type__pay>").append("<![CDATA[" + sundryType + "]]>").append("</sundry_type__pay>");
valueXmlString.append("<sundry_code__pay>").append("<![CDATA[" + sundryCode + "]]>").append("</sundry_code__pay>"); valueXmlString.append("<sundry_code__pay>").append("<![CDATA[" + sundryCode + "]]>").append("</sundry_code__pay>");
...@@ -3197,6 +3202,47 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -3197,6 +3202,47 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
{ {
acctCodeAp = ""; acctCodeAp = "";
cctrCodeAp = ""; cctrCodeAp = "";
//Done changes by sarita on 03 JUL 18 for gtpl Issue Tracker No. 416 to set acct_code_adv and cctr_code_adv if Sundry_type is 'E' and voucher type is 'A' [START]
cctrCodeAdv = findValue(conn, "a.cctr_code__sal" , " employee a, site b ", " a.pay_site = b.site_code and a.emp_code", sundryCode);
empAdvSchemeCd = admCommon.getEnv("999999", "DEF_EMPADV_SCHEMECD", conn);
System.out.println("Sarita 02JUL18::: cctrCodeAdv ["+cctrCodeAdv+"] \t empAdvSchemeCd ["+empAdvSchemeCd+"]");
if("NULLFOUND".equalsIgnoreCase(empAdvSchemeCd) || (empAdvSchemeCd == null ||empAdvSchemeCd.trim().length() == 0))
{
acctCodeAdv = "";
valueXmlString.append("<acct_code__adv>").append("<![CDATA[" + "" + "]]>").append("</acct_code__adv>");
valueXmlString.append("<cctr_code__adv>").append("<![CDATA[" + cctrCodeAdv + "]]>").append("</cctr_code__adv>");
}
else
{
sql = "select acct_code__loan from loan_scheme where scheme_no = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empAdvSchemeCd);
rs = pstmt.executeQuery();
if(rs.next())
{
acctCodeLoan = rs.getString("acct_code__loan");
System.out.println("acctCodeLoan is ["+acctCodeLoan+"]");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(acctCodeLoan != null && acctCodeLoan.trim().length() > 0)
{
acctCodeAdv = acctCodeLoan;
}
else
{
acctCodeAdv = "";
}
}
//Done changes by sarita on 03 JUL 18 for gtpl Issue Tracker No. 416 to set acct_code_adv and cctr_code_adv if Sundry_type is 'E' and voucher type is 'A' [END]
} }
//Added by Varsha V. on 24-05-18 for setting acct_code__pay, cctr_code__pay on sundry_code changed //Added by Varsha V. on 24-05-18 for setting acct_code__pay, cctr_code__pay on sundry_code changed
System.out.println("============acctCodeAp: "+acctCodeAp+" cctrCodeAp: "+cctrCodeAp); System.out.println("============acctCodeAp: "+acctCodeAp+" cctrCodeAp: "+cctrCodeAp);
......
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