Commit 33e16d38 authored by agaikwad's avatar agaikwad

Bug fix-Provision Date(Null Pointer),remove hardcode dlv_term and set comm_per value in validation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@43331 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2bb5862d
...@@ -1641,7 +1641,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -1641,7 +1641,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
commPerc1 = checkDoubleNull((genericUtility.getColumnValue("comm_perc_1", dom))); commPerc1 = checkDoubleNull((genericUtility.getColumnValue("comm_perc_1", dom)));
commPercOn = checkNull(genericUtility.getColumnValue("comm_perc_on_1", dom)); commPercOn = checkNull(genericUtility.getColumnValue("comm_perc_on_1", dom));
if (commPerc != 0 && commPerc > 0) if (commPerc1 != 0 && commPerc1 > 0)
{ {
if (commPercOn == null || commPercOn.trim().length() == 0) if (commPercOn == null || commPercOn.trim().length() == 0)
{ {
...@@ -1661,9 +1661,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -1661,9 +1661,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
// comm_perc_2 // comm_perc_2
else if (childNodeName.equalsIgnoreCase("comm_perc_2"))// doubt else if (childNodeName.equalsIgnoreCase("comm_perc_2"))// doubt
{ {
commPerc1 = checkDoubleNull((genericUtility.getColumnValue("comm_perc_2", dom))); commPerc2 = checkDoubleNull((genericUtility.getColumnValue("comm_perc_2", dom)));
commPercOn = checkNull(genericUtility.getColumnValue("comm_perc_on_2", dom)); commPercOn = checkNull(genericUtility.getColumnValue("comm_perc_on_2", dom));
if (commPerc != 0 && commPerc > 0) if (commPerc2 != 0 && commPerc2 > 0)
{ {
if (commPercOn == null || commPercOn.trim().length() == 0) if (commPercOn == null || commPercOn.trim().length() == 0)
{ {
...@@ -1779,8 +1779,12 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -1779,8 +1779,12 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
ordDtStr=genericUtility.getColumnValue("order_date", dom); ordDtStr=genericUtility.getColumnValue("order_date", dom);
if(prmDtStr!=null && prmDtStr.trim().length()>0) if(prmDtStr!=null && prmDtStr.trim().length()>0)
{ {
promDate = Timestamp.valueOf((genericUtility.getColumnValue("prom_date", dom))); // promDate = Timestamp.valueOf((genericUtility.getColumnValue("prom_date", dom))); comment by Abhijit
orderDate = Timestamp.valueOf((genericUtility.getColumnValue("order_date", dom))); promDate = Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("prom_date", dom), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");// Added By Abhijit Gaikwad
System.out.println("promDate["+promDate+"]");
// orderDate = Timestamp.valueOf((genericUtility.getColumnValue("order_date", dom)));
orderDate = Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("orderDate["+orderDate+"]");
} }
if (((prmDtStr!=null && prmDtStr.trim().length()>0)&& (ordDtStr!=null && ordDtStr.trim().length()>0)) if (((prmDtStr!=null && prmDtStr.trim().length()>0)&& (ordDtStr!=null && ordDtStr.trim().length()>0))
&& promDate.before(orderDate)) && promDate.before(orderDate))
...@@ -11450,10 +11454,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11450,10 +11454,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (dlvTerm == null || dlvTerm.trim().length() == 0) /* if (dlvTerm == null || dlvTerm.trim().length() == 0)
{ {
dlvTerm = "NA"; dlvTerm = "NA";
} }*/
//Changed By Pragyan 19/Mar/17 to set notify term //Changed By Pragyan 19/Mar/17 to set notify term
//valueXmlString.append("<ls_notify_term>").append("<![CDATA[" + dlvTerm + "]]>").append("</ls_notify_term>"); //valueXmlString.append("<ls_notify_term>").append("<![CDATA[" + dlvTerm + "]]>").append("</ls_notify_term>");
valueXmlString.append("<notify_term>").append("<![CDATA[" + dlvTerm + "]]>").append("</notify_term>"); valueXmlString.append("<notify_term>").append("<![CDATA[" + dlvTerm + "]]>").append("</notify_term>");
......
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