Commit b318b5b6 authored by dpawar's avatar dpawar

add validation on tran type


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96202 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f283ec35
......@@ -143,6 +143,48 @@ public class MiscVchEmpIC extends ValidatorEJB implements MiscVchEmpICLocal,Misc
errFields.add( childNodeName.toLowerCase() );
}
}
//new add
if(childNodeName.equalsIgnoreCase("tran_type"))
{
String tranType="";
tranType = checkNull(genericUtility.getColumnValue("tran_type",dom));
System.out.println("tran_type---->["+tranType+"]");
if (tranType.length()==0)
{
errCode = "VMTRNTNN";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
else
{
sql="select count(*) from gencodes where mod_name = ? and fld_name = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "W_MISC_VCH_EMP");
pstmt.setString(2, tranType);
rs=pstmt.executeQuery();
if(rs.next()){
cnt1=rs.getInt(1);
}
if(rs!=null){
rs.close();
rs=null;
}
if(pstmt!=null){
pstmt.close();
pstmt=null;
}
System.out.println("tranType cnt1--->"+cnt1);
if(cnt1 == 0){
errCode = "VMTRTGEN";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
}
}
//new add end
if (childNodeName.equalsIgnoreCase("anal_code"))
{
analCode = checkNull(genericUtility.getColumnValue("anal_code",dom));
......
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