Commit d6ab6dc0 authored by ssalve's avatar ssalve

Sarita: changes validation for exp_date on 26MARCH2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@182614 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 35abdfe9
......@@ -132,7 +132,8 @@ public class AsnIC extends ValidatorEJB implements AsnICRemote,AsnICLocal
//ConnDriver connDriver = null;
//changed by sankara on 18/11/13 for black_list supp code
String blackList = "";
Added by sarita on 26MARCH2018
String itemCodeDtl = "",trackShelfLife="",expDate = "";
try
{
......@@ -727,8 +728,40 @@ public class AsnIC extends ValidatorEJB implements AsnICRemote,AsnICLocal
}
}*/
else if ( "exp_date".equalsIgnoreCase( childNodeName ) )
{
if ( childNode.getFirstChild() == null )
{
//Added by sarita for exp_date validation [start] 26MARCH2018
itemCodeDtl = genericUtility.getColumnValue("item_code", dom);
expDate = genericUtility.getColumnValue("exp_date", dom);
sql = "select track_shelf_life from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCodeDtl);
rs = pstmt.executeQuery();
if(rs.next())
{
trackShelfLife = rs.getString("track_shelf_life");
System.out.println("Shelf Life Flag is :["+trackShelfLife+"]");
}
if ( rs != null )
{
rs.close();
rs = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if("Y".equalsIgnoreCase(trackShelfLife))
{
if(expDate == null || expDate.trim().length() == 0)
{
errList.add( "NULLEXPDT" );
errFields.add( childNodeName.toLowerCase());
}
}
//Added by sarita for exp_date validation [end] 26MARCH2018
//commented by sarita on 26th MARCH 2018 [start]
/* if ( childNode.getFirstChild() == null )
{
// 26/10/11 manoharan all the errors should be returned so that warnings can be processed
//errString = getErrorString("exp_date","NULLEXPDT",userId);
......@@ -736,7 +769,8 @@ public class AsnIC extends ValidatorEJB implements AsnICRemote,AsnICLocal
errList.add( "NULLEXPDT" );
errFields.add( childNodeName.toLowerCase() );
// end 26/10/11 manoharan all the errors should be returned so that warnings can be processed
}
}*/
//commented by sarita on 26th MARCH 2018 [end]
}
//changed by dhanraj on 20/08/14 for mfg site code and mfg code start.
else if ( "site_code__mfg".equalsIgnoreCase( childNodeName ) )
......@@ -791,7 +825,7 @@ public class AsnIC extends ValidatorEJB implements AsnICRemote,AsnICLocal
if(flag.equals("T")){
System.out.println("mfg Date Less or equal than sys date");
//for exp date greator than mfg date.
String expDate = genericUtility.getColumnValue( "exp_date", dom );
expDate = genericUtility.getColumnValue( "exp_date", dom );
mfgDate = genericUtility.getColumnValue( "mfg_date", dom );
flag=DateValidation(expDate,mfgDate);
if(flag.equals("T")){//Then check exp date
......
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