Commit 97d5869e authored by mchauhan's avatar mchauhan

channelPartner variable to be initialised with "N" in case it is null before comparing

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216491 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6d216ad6
...@@ -599,7 +599,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -599,7 +599,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
{ {
valueXmlString.append("<exch_rate protect =\"0\">").append(sExchRate).append("</exch_rate>"); valueXmlString.append("<exch_rate protect =\"0\">").append(sExchRate).append("</exch_rate>");
} }
if(currCode.trim().length()>0 && ( currCode.trim().equalsIgnoreCase( currCodeBase.trim() )))//Added if condition by Mukesh Chauhan on 24/01/20 if(currCode.trim().length()>0 && ( currCode.trim().equalsIgnoreCase( currCodeBase.trim() )))//added if condition by nandkumar gadkari on 23/01/20
{ {
valueXmlString.append("<exch_rate protect =\"1\">").append("1").append("</exch_rate>"); valueXmlString.append("<exch_rate protect =\"1\">").append("1").append("</exch_rate>");
} }
...@@ -4915,7 +4915,13 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -4915,7 +4915,13 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
pstmt = null; pstmt = null;
} }
if ( channelPartner != null && !"Y".equals( channelPartner ) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )//changes by Nandkumar Gadkari on 19MAR2018
if( channelPartner == null || channelPartner.trim().length() == 0 )//Added by mukesh chauhan on 05/02/2020
{
channelPartner="N";
}
/*if ( channelPartner != null && !"Y".equals( channelPartner ) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )*///changes by Nandkumar Gadkari on 19MAR2018
if (( channelPartner != null && !"Y".equals( channelPartner )) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )// Changed by mukesh chauhan on 05/02/2020
{ {
sqlStr = " select deduct_perc " //into :mdisc sqlStr = " select deduct_perc " //into :mdisc
...@@ -5466,7 +5472,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -5466,7 +5472,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
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")
siteCode = genericUtility.getColumnValue( "site_code", dom1 ); // dw_header.getitemstring(1,"site_code") siteCode = genericUtility.getColumnValue( "site_code", dom1 ); // dw_header.getitemstring(1,"site_code")
sqlStr = " select channel_partner ls_channel_partner " //into :ls_channel_partner sqlStr = " select channel_partner ls_channel_partner " //into :ls_channel_partner
+" from site_customer " +" from site_customer "
+" where cust_code = ? " //:ls_cust_code +" where cust_code = ? " //:ls_cust_code
...@@ -5506,9 +5512,13 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -5506,9 +5512,13 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if( channelPartner == null || channelPartner.trim().length() == 0 )//Added by mukesh chauhan on 05/02/2020
{
channelPartner="N";
}
if( !"Y".equalsIgnoreCase( channelPartner ) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )//changes by Nandkumar Gadkari on 19MAR2018 if( !"Y".equalsIgnoreCase( channelPartner ) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )//changes by Nandkumar Gadkari on 19MAR2018
{ {
sqlStr = " select deduct_perc mdisc " sqlStr = " select deduct_perc mdisc "
+" from sreturn_norms " +" from sreturn_norms "
+" where days_from <= ? " //:mdays +" where days_from <= ? " //:mdays
...@@ -6248,6 +6258,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -6248,6 +6258,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if( channelPartner == null && custCode != null) if( channelPartner == null && custCode != null)
{ {
sqlStr = " select channel_partner ls_channel_partner " sqlStr = " select channel_partner ls_channel_partner "
...@@ -6270,9 +6281,14 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -6270,9 +6281,14 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if( channelPartner == null || channelPartner.trim().length() == 0 )//Added by mukesh chauhan on 05/02/2020
if( channelPartner != null && !"Y".equalsIgnoreCase( channelPartner ) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )//changes by Nandkumar Gadkari on 19MAR2018
{ {
channelPartner="N";
}
/*if( channelPartner != null && !"Y".equalsIgnoreCase( channelPartner ) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )*///changes by Nandkumar Gadkari on 19MAR2018
if(( channelPartner != null && !"Y".equalsIgnoreCase( channelPartner )) || "Y".equalsIgnoreCase(shExpDiscAppl.trim()) )//changed by mukesh chauhan on 05/02/2020
{
sqlStr = " select deduct_perc mdisc from sreturn_norms " sqlStr = " select deduct_perc mdisc from sreturn_norms "
+" where days_from <= ? " //:mdays +" where days_from <= ? " //:mdays
+" and days_to >= ? "; //:mdays; +" and days_to >= ? "; //:mdays;
......
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