Commit c938a5ef authored by piyush's avatar piyush

Changes done in :

1) EmpBondDefinition.java - To allow 0 amount in existing line item
2) LoanSchedulePrs.java - To check duplicate null installment and installment related validations

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@178879 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 974dc9be
...@@ -428,17 +428,21 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition ...@@ -428,17 +428,21 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition
}//Modified by RAHUL SHENOY on 11/08/2015 [Reference Line Number validation].End }//Modified by RAHUL SHENOY on 11/08/2015 [Reference Line Number validation].End
if (childNodeName.equalsIgnoreCase("bond_amt")) // Modified by Piyush on 18/01/2018 [Added else if instead of if]
// if (childNodeName.equalsIgnoreCase("bond_amt"))
else if (childNodeName.equalsIgnoreCase("bond_amt"))
{ {
bondamt = genericUtility.getColumnValue("bond_amt",dom); bondamt = genericUtility.getColumnValue("bond_amt",dom);
if (bondamt == null ) if (bondamt == null )
{ {
/*
errCode = "VMBAMTNULL"; errCode = "VMBAMTNULL";
errString = getErrorString("bond_amt",errCode,userId); errString = getErrorString("bond_amt",errCode,userId);
break; break;
*/
bondamt = "0.0";
} }
//Modified by Rahul Shenoy on 11/08/2015 [Revised Bond Amount Validations].Start //Modified by Rahul Shenoy on 11/08/2015 [Revised Bond Amount Validations].Start
try try
...@@ -460,6 +464,9 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition ...@@ -460,6 +464,9 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition
break; break;
} }
lineNoRef = genericUtility.getColumnValue("line_no__ref",dom);
lineNoRef = lineNoRef == null || lineNoRef.trim().length() == 0?"0":lineNoRef.trim();
lineNoRefInt = Integer.parseInt(lineNoRef);
if(bondamtDouble == 0.0 && lineNoRefInt == 0) if(bondamtDouble == 0.0 && lineNoRefInt == 0)
{ {
...@@ -471,7 +478,9 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition ...@@ -471,7 +478,9 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition
} }
if (childNodeName.equalsIgnoreCase("bond_prd")) // Modified by Piyush on 18/01/2018 [Added else if instead of if]
// if (childNodeName.equalsIgnoreCase("bond_prd"))
else if (childNodeName.equalsIgnoreCase("bond_prd"))
{ {
bondprd = genericUtility.getColumnValue("bond_prd",dom); bondprd = genericUtility.getColumnValue("bond_prd",dom);
...@@ -819,7 +828,9 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition ...@@ -819,7 +828,9 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition
valueXmlString.append("<line_no__ref>").append("<![CDATA[0]]>").append("</line_no__ref>"); valueXmlString.append("<line_no__ref>").append("<![CDATA[0]]>").append("</line_no__ref>");
} }
if(currentColumn.trim().equalsIgnoreCase("line_no__ref")) // Modified by Piyush on 18/01/2018 [Added else if instead of if]
//if(currentColumn.trim().equalsIgnoreCase("line_no__ref"))
else if(currentColumn.trim().equalsIgnoreCase("line_no__ref"))
{ {
lineNoRef = genericUtility.getColumnValue("line_no__ref",dom); lineNoRef = genericUtility.getColumnValue("line_no__ref",dom);
empCode = genericUtility.getColumnValue("emp_code",dom1); empCode = genericUtility.getColumnValue("emp_code",dom1);
...@@ -870,6 +881,17 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition ...@@ -870,6 +881,17 @@ public class EmpBondDefinition extends ValidatorEJB implements EmpBondDefinition
valueXmlString.append("<bond_amt>").append("<![CDATA["+bondAmt+"]]>").append("</bond_amt>"); valueXmlString.append("<bond_amt>").append("<![CDATA["+bondAmt+"]]>").append("</bond_amt>");
} }
// Modified by Piyush on 18/01/2018 [To set 0 amount in case of bond amount is null or empty].Start
else if (currentColumn.trim().equalsIgnoreCase("bond_amt"))
{
String bondAmtStr = genericUtility.getColumnValue("bond_amt",dom);
if ( bondAmtStr == null || bondAmtStr.trim().length() == 0)
{
bondAmtStr = "0.00";
valueXmlString.append("<bond_amt>").append("<![CDATA["+bondAmtStr+"]]>").append("</bond_amt>");
}
}
// Modified by Piyush on 18/01/2018 [To set 0 amount in case of bond amount is null or empty].End
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
break; break;
//Modified by RAHUL SHENOY on 11/08/2015 [Case 2 for item changes in Form 2].End //Modified by RAHUL SHENOY on 11/08/2015 [Case 2 for item changes in Form 2].End
......
This diff is collapsed.
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.sql.Connection;
import javax.ejb.Local;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
@Local
public interface LoanSchedulePrsLocal extends ValidatorLocal
{
public String preSave() throws RemoteException,ITMException;
public String preSaveLogic(Document dom,String editFlag, String xtraParams, Connection conn) throws RemoteException,ITMException;
public String preSave(String xmlString, String editFlag, String xtraParams, Connection conn) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.adm;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
import javax.ejb.Remote;
import org.w3c.dom.Document;
@Remote
public interface LoanSchedulePrsRemote extends ValidatorRemote
{
public String preSave() throws RemoteException,ITMException;
public String preSaveLogic(Document dom,String editFlag, String xtraParams, Connection conn) throws RemoteException,ITMException;
public String preSave(String xmlString, String editFlag, String xtraParams, Connection conn) throws RemoteException,ITMException;
}
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