Commit 0c9f26f0 authored by msaggam's avatar msaggam

Sales return - channel partner and invoice id specified not to allow manual...

Sales return - channel partner and invoice id specified not to allow manual entry, the chanel partner flag is taken from customer, it has to be taken from site_customer 1st if blank in site_customer then it has to be taken from customer The error code VTPRCRINSR

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@202277 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b6a5e4ad
...@@ -7155,14 +7155,33 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -7155,14 +7155,33 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
childNodeName.equalsIgnoreCase( "cust_code__bill" ) || childNodeName.equalsIgnoreCase( "cust_code__bill" ) ||
childNodeName.equalsIgnoreCase( "cust_code__dlv" ) ) childNodeName.equalsIgnoreCase( "cust_code__dlv" ) )
{ {
String invoiceId = genericUtility.getColumnValue( "invoice_id", dom );
errCode = null; errCode = null;
mVal = genericUtility.getColumnValue( childNodeName.trim(), dom ); //dw_edit.GetItemString(dw_edit.GetRow(),fldname) mVal = genericUtility.getColumnValue( childNodeName.trim(), dom ); //dw_edit.GetItemString(dw_edit.GetRow(),fldname)
System.out.println( "mVal :: " + mVal + " :childNodeName: " + childNodeName ); System.out.println( "mVal :: " + mVal + " :childNodeName: " + childNodeName );
siteCode = genericUtility.getColumnValue( "site_code", dom ); //dw_edit.getitemstring(1,"site_code") siteCode = genericUtility.getColumnValue( "site_code", dom ); //dw_edit.getitemstring(1,"site_code")
lsItemser = genericUtility.getColumnValue( "item_ser", dom ); //dw_edit.getItemString(1,"item_ser") lsItemser = genericUtility.getColumnValue( "item_ser", dom ); //dw_edit.getItemString(1,"item_ser")
//Added By PriyankaC on 15JAN18 [START].
String invoiceId = genericUtility.getColumnValue( "invoice_id", dom );
// Added by Mahesh Saggam on 18-June-2019 [Start]
sqlStr = "select channel_partner from site_customer where site_code = ? and cust_code = ?";
pstmt = conn.prepareStatement(sqlStr);
pstmt.setString(1, siteCode);
pstmt.setString( 2, mVal );
rs = pstmt.executeQuery();
if( rs.next() )
{
channelPartner = rs.getString( "channel_partner" );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(channelPartner == null || channelPartner.trim().length() == 0)
{
//Added By PriyankaC on 15JAN18 [START].
System.out.println( "invoiceId in side custCode :: " + invoiceId ); System.out.println( "invoiceId in side custCode :: " + invoiceId );
sqlStr = "select channel_partner from customer where cust_code = ? "; sqlStr = "select channel_partner from customer where cust_code = ? ";
pstmt = conn.prepareStatement( sqlStr ); pstmt = conn.prepareStatement( sqlStr );
...@@ -7177,16 +7196,17 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -7177,16 +7196,17 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Added By PriyankaC on 15JAN18.[END.]
if( invoiceId != null && "Y".equalsIgnoreCase( channelPartner ) ) }
if( "Y".equalsIgnoreCase( channelPartner ) )
{ {
System.out.println( "invoiceId :: " + invoiceId +"channelPartner :: "+channelPartner); System.out.println( "invoiceId :: " + invoiceId +"channelPartner :: "+channelPartner);
errCode = "VTPRCRINSR"; errCode = "VTPRCRINSR";
errList.add( errCode ); errList.add( errCode );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
// Added by Mahesh Saggam on 18-June-2019 [End]
//Added By PriyankaC on 15JAN18.[END.]
sqlStr = " select black_listed black_listed_yn " sqlStr = " select black_listed black_listed_yn "
+" from customer_series " +" from customer_series "
+" where cust_code= ? " //:mval +" where cust_code= ? " //:mval
......
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