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
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);
if(grpCode!=null || grpCode.trim().length()>0 )
{
String sql1="Select count(*) from item where product_code= ? and grp_code= ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, productCode);
pstmt.setString(2, grpCode);
rs=pstmt.executeQuery();
if(rs.next())
{
count=rs.getInt(1);
}
pstmt.close();
pstmt=null;
rs.close();
rs=null;
if(count==0)
{
errCode="VTINVGRPCD";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
}
String sql1="Select count(*) from item where product_code= ? and grp_code= ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, productCode);
pstmt.setString(2, grpCode);
rs=pstmt.executeQuery();
if(rs.next())
{
count=rs.getInt(1);
}
pstmt.close();
pstmt=null;
rs.close();
rs=null;
if(count==0)
{
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