Commit 52a70ac5 authored by msharma's avatar msharma

Validation added for rcpacct amount considering eff_bank column


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103033 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e1853b86
...@@ -172,6 +172,8 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -172,6 +172,8 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
ResultSet rs = null; ResultSet rs = null;
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
String effBankStr="",rcpacctAmt="";
double rcpacctAmtdbl=0;
try try
{ {
finCommon = new FinCommon(); finCommon = new FinCommon();
...@@ -1927,6 +1929,33 @@ conn = getConnection(); ...@@ -1927,6 +1929,33 @@ conn = getConnection();
} }
} }
}
else
{
effBankStr = checkNull(this.genericUtility.getColumnValue("eff_bank", dom));
rcpacctAmt=checkNull(this.genericUtility.getColumnValue("amount", dom));
if(effBankStr==null || effBankStr.trim().length()==0)
{
effBankStr="N";
}
if(rcpacctAmt==null || rcpacctAmt.trim().length()==0)
{
rcpacctAmt="0";
}
rcpacctAmtdbl=Double.parseDouble(rcpacctAmt);
if("N".equalsIgnoreCase(effBankStr) && rcpacctAmtdbl<0)
{
errList.add("VTNGNTALW");
errFields.add("amount".toLowerCase());
}
else if("Y".equalsIgnoreCase(effBankStr) && rcpacctAmtdbl>=0)
{
errList.add("VTPSNTALW");
errFields.add("amount".toLowerCase());
}
} }
} }
......
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