Commit 661a16df authored by manohar's avatar manohar

replacement lr_date null pointer exception corrected


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91299 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b6dda8dd
...@@ -3907,11 +3907,18 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -3907,11 +3907,18 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
mexpDate = Timestamp.valueOf(genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); mexpDate = Timestamp.valueOf(genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
mtranDateStr = genericUtility.getColumnValue( "lr_date", dom1 ); // dw_header.getitemdatetime(1,"lr_date") mtranDateStr = genericUtility.getColumnValue( "lr_date", dom1 ); // dw_header.getitemdatetime(1,"lr_date")
ldtLrdate = Timestamp.valueOf(genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); // 17/06/10 manoharan commented and put in else condition as null is to be taken care off
//ldtLrdate = Timestamp.valueOf(genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
if( ldtLrdate == null || "19000101".equals( genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), "yyyymmdd" ) ) ) //Isnull(ldt_lrdate) or string(ldt_lrdate,"yyyymmdd") = "19000101" then if( ldtLrdate == null || "19000101".equals( genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), "yyyymmdd" ) ) ) //Isnull(ldt_lrdate) or string(ldt_lrdate,"yyyymmdd") = "19000101" then
{ {
ldtLrdate = mtranDate; ldtLrdate = mtranDate;
} }
else
{
ldtLrdate = Timestamp.valueOf(genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
// end 17/06/10 manoharan
mdiffDays = (int)utilMethods.DaysAfter( ldtLrdate, mexpDate ); mdiffDays = (int)utilMethods.DaysAfter( ldtLrdate, mexpDate );
mdays = mdiffDays; mdays = mdiffDays;
custCode = genericUtility.getColumnValue( "cust_code", dom1 ); //dw_header.getitemstring(1,"cust_code") custCode = genericUtility.getColumnValue( "cust_code", dom1 ); //dw_header.getitemstring(1,"cust_code")
......
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