Commit 06787be8 authored by prane's avatar prane

to handle NPE in case of ldTranDate found null based on start_from from crterm

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196569 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1cbac1b5
......@@ -1492,13 +1492,35 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
// System.out.println("Effective date:::::::::::"+effDate);
// System.out.println("LR date:::::::::::"+lrDate);
if("D".equalsIgnoreCase(startFrom) || "Q".equalsIgnoreCase(startFrom) || "B".equalsIgnoreCase(startFrom))
{
if(effDate != null && effDate.trim().length() > 0)
{
ldTranDate = Timestamp.valueOf(genericUtility.getValidDateString(effDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); //Timestamp.valueOf(effDate);
}
}
else if("L".equalsIgnoreCase(startFrom))
{
if(lrDate != null && lrDate.trim().length() > 0)
{
ldTranDate = Timestamp.valueOf(genericUtility.getValidDateString(lrDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); //Timestamp.valueOf(lrDate);
}
}
//added by Pavan Rane 01feb2019 [to handle NPE in case of ldTranDate found null based on start_from from crterm]
if(ldTranDate == null)
{
if(invDate != null && invDate.trim().length() > 0)
{
ldTranDate = Timestamp.valueOf(genericUtility.getValidDateString(invDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
else if(effDate != null && effDate.trim().length() > 0)
{
ldTranDate = Timestamp.valueOf(genericUtility.getValidDateString(effDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}else if(lrDate != null && lrDate.trim().length() > 0)
{
ldTranDate = Timestamp.valueOf(genericUtility.getValidDateString(lrDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
}
//Pavan Rane 01feb2019 end
//pending for R
//System.out.println("ldTranDate::::::::::::"+ldTranDate);
......
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