Commit 702da0d6 authored by prane's avatar prane

fixing the functionalities in retainer contract

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183418 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4056aa0e
......@@ -129,7 +129,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
String projCodes = "";
String payableReceivable = "";
double amount = 0.0;
Timestamp contractDate = null;
Timestamp contractDate = null, effDate = null, validUpto = null;
FinCommon finCommon = null;
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
try
......@@ -353,11 +353,12 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
else if (childNodeName.equalsIgnoreCase("eff_date"))
{
effDateStr = checkNull(genericUtility.getColumnValue("eff_date", dom));
//effDate = Timestamp.valueOf(genericUtility.getValidDateString(effDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
effDate = Timestamp.valueOf(genericUtility.getValidDateString(effDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
validUptoStr = checkNull(genericUtility.getColumnValue("valid_upto", dom));
//validUpto = Timestamp.valueOf(genericUtility.getValidDateString(validUptoStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
validUpto = Timestamp.valueOf(genericUtility.getValidDateString(validUptoStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
//if(validUpto.compareTo(effDate) < 0)
if(validUptoStr.compareTo(effDateStr) < 0)
//if(validUptoStr.compareTo(effDateStr) < 0)
if(validUpto.before(effDate))
{
//effective date is less than valid date
errList.add("VTDATE6");
......@@ -786,6 +787,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
String childNodeName = null;
Timestamp currentDate= null;
FinCommon finCommon = null;
DistCommon distCommon = null;
try {
System.out.println("----------------Inside itemChanged-------------------");
finCommon = new FinCommon();
......@@ -1242,8 +1244,17 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
pstmt.close();
pstmt = null;
valueXmlString.append("<curr_code>").append("<![CDATA[" + currCode + "]]>").append("</curr_code>");
valueXmlString.append("<currency_descr>").append("<![CDATA[" + currencyDescr + "]]>").append("</currency_descr>");
//valueXmlString.append("<>").append("<![CDATA[" + + "]]>").append("</>");
valueXmlString.append("<currency_descr>").append("<![CDATA[" + currencyDescr + "]]>").append("</currency_descr>");
//Pavan R on 10APR18 [to set tax class and tax chapter from sundry Masters.]
taxClass = distCommon.getTaxClass(sundryCode, sundryCode, "", siteCode, conn);
taxChap = distCommon.getTaxChap("", "", sundryCode, sundryCode, siteCode, conn);
System.out.println("taxClass:["+taxClass+"]taxChap:["+taxChap+"]");
valueXmlString.append("<tax_class>").append("<![CDATA[" + taxClass + "]]>").append("</tax_class>");
valueXmlString.append("<tax_chap>").append("<![CDATA[" + taxChap + "]]>").append("</tax_chap>");
//valueXmlString.append("<tax_env>").append("<![CDATA[" + taxEnv + "]]>").append("</tax_env>");
//Pavan R on 10APR18 END
}else if(currentColumn.trim().equalsIgnoreCase("sundry_type"))
{
......@@ -1388,7 +1399,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
valueXmlString.append("<tax_chap protect = \"0\">").append("<![CDATA[]]>").append("</tax_chap>");
valueXmlString.append("<tax_env protect = \"0\">").append("<![CDATA[]]>").append("</tax_env>");
}
else
else
{
valueXmlString.append("<tax_class protect = \"1\">").append("<![CDATA[]]>").append("</tax_class>");
valueXmlString.append("<tax_chap protect = \"1\">").append("<![CDATA[]]>").append("</tax_chap>");
......
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