Commit 5aeb36ca authored by kshinde's avatar kshinde

bug fix grp code validation in pricelist wizard

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@180013 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 84e78af3
...@@ -673,36 +673,38 @@ public class PricelistGenWizEJB extends ValidatorEJB implements PricelistGenWizE ...@@ -673,36 +673,38 @@ public class PricelistGenWizEJB extends ValidatorEJB implements PricelistGenWizE
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
if(childNodeName.equalsIgnoreCase("grp_code"))
}
if(childNodeName.equalsIgnoreCase("grp_code"))
{
grpCode=e12genericUtility.getColumnValue("grp_code", currFormDataDom);
productCode=e12genericUtility.getColumnValue("product_code", currFormDataDom);
if(grpCode!=null || grpCode.trim().length()>0 )
{ {
grpCode=e12genericUtility.getColumnValue("grp_code", currFormDataDom); String sql1="Select count(*) from item where product_code= ? and grp_code= ?";
pstmt=conn.prepareStatement(sql);
if(grpCode!=null || grpCode.trim().length()>0 ) pstmt.setString(1, productCode);
{ pstmt.setString(2, grpCode);
String sql1="Select count(*) from item where product_code= ? and grp_code= ?"; rs=pstmt.executeQuery();
pstmt=conn.prepareStatement(sql); if(rs.next())
pstmt.setString(1, productCode); {
pstmt.setString(2, grpCode); count=rs.getInt(1);
rs=pstmt.executeQuery(); }
if(rs.next()) pstmt.close();
{ pstmt=null;
count=rs.getInt(1); rs.close();
} rs=null;
pstmt.close(); if(count==0)
pstmt=null; {
rs.close(); errCode="VTINVGRPCD";
rs=null; errList.add( errCode );
if(count==0) errFields.add( childNodeName.toLowerCase() );
{
errCode="VTINVGRPCD";
errList.add( errCode );
errFields.add( childNodeName.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