Commit 8a4d0a9a authored by smane's avatar smane

update IncidentChargeIC.java for changes made for give validation of incidental charges code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94533 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6e4c5057
...@@ -69,7 +69,7 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo ...@@ -69,7 +69,7 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo
String userId = ""; String userId = "";
String sql = ""; String sql = "";
String errorType = ""; String errorType = "";
int cnt = 0; int cnt = 0,count=0;
int ctr=0; int ctr=0;
int childNodeListLength; int childNodeListLength;
NodeList parentNodeList = null; NodeList parentNodeList = null;
...@@ -119,6 +119,45 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo ...@@ -119,6 +119,45 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo
errCode = "VMNULINCCD"; errCode = "VMNULINCCD";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
}
else
{
//check for valid Incidental Charges Code...
System.out.println(">>>>Check for gencode exist W_INC_CHARGES:"+incCharge);
sql="select count(1) from gencodes where MOD_NAME = ? and fld_name = ? and trim(fld_value) = trim(?)";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "W_INC_CHARGES");
pstmt.setString(2, "INC_CHG");
pstmt.setString(3, incCharge);
rs=pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(count==0)
{
System.out.println(">>>>Check for gencode exist X:"+incCharge);
sql="select count(1) from gencodes where MOD_NAME = ? and fld_name = ? and trim(fld_value) = trim(?)";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "X");
pstmt.setString(2, "INC_CHG");
pstmt.setString(3, incCharge);
rs=pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
}
if(count==0)
{
errCode = "VMVLDCHGCD";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
} }
} }
if(childNodeName.equalsIgnoreCase("from_day")) if(childNodeName.equalsIgnoreCase("from_day"))
......
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