Commit eb399f22 authored by arawankar's avatar arawankar

PoReceiptIc.java

-Changes made to validate expiry date 
If expiry date is before mfg date then system should show an error message

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@193327 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e6cebb3f
......@@ -3135,11 +3135,34 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
if (childNodeName.equalsIgnoreCase("expiry_date"))
{
String expirydate="",mdretestdt="",mdate2="",itemcode="",sitecode="",lsqcreqd="",lsautoreqc="",lstrackshelflife="";
//Modified by Anjali R. on [22/11/2018][Start]
String mfgDate = "";
java.sql.Timestamp mfgDt = null;
java.sql.Timestamp expDt = null;
//Modified by Anjali R. on [22/11/2018][End]
expirydate=checkNull(genericUtility.getColumnValue("expiry_date", dom));
mdretestdt=genericUtility.getColumnValue("retest_date", dom);
mdate2=checkNull(genericUtility.getColumnValue("rec_date", dom1));
itemcode=genericUtility.getColumnValue("item_code", dom);
sitecode=genericUtility.getColumnValue("site_code", dom1);
//Modified by Anjali R. on [22/11/2018][Exp_date should not be less than mfg_date][Start]
mfgDate = checkNull(genericUtility.getColumnValue("mfg_date", dom));
if((mfgDate != null && mfgDate.trim().length() > 0) && (expirydate != null && expirydate.trim().length() > 0))
{
mfgDt = discommon.getTimeStamp(mfgDate);
expDt = discommon.getTimeStamp(expirydate);
if(expDt.before(mfgDt))
{
errCode = "VTMFGEXPDT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
//Modified by Anjali R. on [22/11/2018][Exp_date should not be less than mfg_date][End]
lsqcreqd = gfqcreqd(sitecode,itemcode,conn);
lsautoreqc = gfautoqcreqd(sitecode,itemcode,conn);
sql= "select (case when track_shelf_life is null then 'Y' else track_shelf_life end) from item where item_code = ? ";
......@@ -3154,6 +3177,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs = null;
pstmt.close();
pstmt = null;
if("Y".equalsIgnoreCase(lstrackshelflife))
{
if(expirydate == null || expirydate.trim().length() == 0)
......@@ -3164,7 +3188,6 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
else
{
if(mdate2 == null || mdate2.trim().length() == 0)
{
......
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