Commit 08dab32b authored by agaikwad's avatar agaikwad

set exp date as mfg_date item_change


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104997 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ea17ad57
......@@ -3110,7 +3110,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
pstmt.setString(1,lstranid);
pstmt.setString(2,lspurcorder);
pstmt.setString(3,itemcode);
pstmt.setString(4,lsbatchno);
pstmt.setString(4,lsbatchno.trim());
pstmt.setString(5,lslineno);
pstmt.setString(6,lsrcpline);
rs = pstmt.executeQuery();
......@@ -3130,7 +3130,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errFields.add(childNodeName.toLowerCase());
}
if(lsbatchno!=null || lsbatchno.trim().length()>0)
if(lsbatchno!=null && lsbatchno.trim().length()>0)
{
lslineno = " " + lslineno;
lslineno = lslineno.substring(lslineno.length() - 3, lslineno.length());
......@@ -6536,7 +6536,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
{
valueXmlString.append("<expiry_date >").append("").append("</expiry_date>");
}
if(mfgParseDate== null || mfgParseDate.trim().length() == 0)
else
{
System.out.println("ldtmfgdate if lsmfgset null["+ldtmfgdate+"]");
mfgParseDate=sdf1.format(ldmfgdate);
......@@ -7309,8 +7309,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
{
valueXmlString.append("<expiry_date >").append("").append("</expiry_date>");
}
if(mfgParseDate== null || mfgParseDate.trim().length() == 0)
else
{
System.out.println("ldtmfgdate if lsmfgset null["+ldtmfgdate+"]");
mfgParseDate=sdf1.format(ldmfgdate);
......@@ -8330,14 +8329,17 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
else if(currentColumn.trim().equalsIgnoreCase("mfg_date"))
{
java.sql.Timestamp mmfgDate = null,expirydate=null;
java.sql.Timestamp mmfgDate = null;//,expirydate=null;
Timestamp expDate11=null,expDate12=null;
String dtStr2="";
String lsshelflifetype="",lsmfgset="",expDate="";
lsitemcode = genericUtility.getColumnValue( "item_code", dom ); // dw_detedit[ii_currformno].getitemstring(1,"item_code")
String dtStr = genericUtility.getColumnValue( "mfg_date", dom ); //dw_detedit[ii_currformno].getitemdatetime(1,"mfg_date")
System.out.println("dtStr[mfg_date]["+dtStr+"]");
if(dtStr != null)
{
mmfgDate = Timestamp.valueOf(genericUtility.getValidDateString(dtStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("Format mmfgDate[mfg_date]["+mmfgDate+"]");
}
sql="select (case when track_shelf_life is null then 'N' else track_shelf_life end)," +
"(case when shelf_life is null then 0 else shelf_life end )," +
......@@ -8376,8 +8378,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
System.out.println("dtStr1["+dtStr1+"]");//dhiraj
if(dtStr1 != null)
{
expirydate = Timestamp.valueOf(genericUtility.getValidDateString(dtStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
/*expirydate = Timestamp.valueOf(genericUtility.getValidDateString(dtStr1, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("expirydate@D["+expirydate+"]");//dhiraj
*/ dtStr2=dtStr1;
System.out.println("dtStr2["+dtStr2+"]");
}
if(!"Y".equalsIgnoreCase(lsmfgset) && !"U".equalsIgnoreCase(lsmfgset))
{
......@@ -8397,12 +8401,14 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
System.out.println("dtStr1 Exp Date "+dtStr1);
if(dtStr1 != null)
{
expirydate = Timestamp.valueOf(genericUtility.getValidDateString(dtStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("expirydate@D@E["+expirydate+"]");//dhiraj
/*expirydate = Timestamp.valueOf(genericUtility.getValidDateString(dtStr1, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("expirydate@D@E["+expirydate.toString()+"]");//dhiraj
*/ dtStr2=dtStr1;
System.out.println("dtStr2["+dtStr2+"]");
//expirydate = CalcExpiry1(mmfgDate, lishelflife);//DHIRAJ
//System.out.println("expirydate@CalcX@E["+expirydate+"]");//dhiraj
}
valueXmlString.append("<retest_date >").append("<![CDATA[" + expirydate + "]]>").append("</retest_date>");
valueXmlString.append("<retest_date >").append("<![CDATA[" + dtStr2 + "]]>").append("</retest_date>");
}
else
{
......
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