Commit f9d4e76a authored by pchavan's avatar pchavan

Add VHB validation in sales return on cust_code field.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@178983 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b8915334
......@@ -5659,6 +5659,8 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
String errorType = "";
String locCode = "", faciLocCode = "", faciSiteCode = "";
String tranId = "";
//String invoiceId = ""; //Added By PriyankaC on 15JAN18.
String channelPartner="";
try
{
//Changes and Commented By Bhushan on 09-06-2016 :START
......@@ -5788,17 +5790,41 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
errCode = null;
mVal = genericUtility.getColumnValue( childNodeName.trim(), dom ); //dw_edit.GetItemString(dw_edit.GetRow(),fldname)
System.out.println( "mVal :: " + mVal + " :childNodeName: " + childNodeName );
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 );
System.out.println( "invoiceId in side custCode :: " + invoiceId );
sqlStr = "select channel_partner from customer where cust_code = ? ";
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, mVal );
rs = pstmt.executeQuery();
if( rs.next() )
{
channelPartner = rs.getString( "channel_partner" );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( invoiceId != null && "Y".equalsIgnoreCase( channelPartner ) )
{
System.out.println( "invoiceId :: " + invoiceId +"channelPartner :: "+channelPartner);
errCode = "VTPRCRINSR";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
//Added By PriyankaC on 15JAN18.[END.]
sqlStr = " select black_listed black_listed_yn "
+" from customer_series "
+" where cust_code= ? " //:mval
+" and item_ser = ? "; //:ls_itemser;
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, mVal );
pstmt.setString( 2, lsItemser );
......@@ -5835,7 +5861,6 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
+" where cust_code = ? "; //:mVal;
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, 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