Commit 6e2c4029 authored by prane's avatar prane

If return option is credit note[C] then system should not be validate the price list

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183111 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 181ce229
......@@ -5670,6 +5670,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
String locCode = "", faciLocCode = "", faciSiteCode = "";
String tranId = "";
//String invoiceId = ""; //Added By PriyankaC on 15JAN18.
String retOpt = "";
String channelPartner="";
try
{
......@@ -6136,31 +6137,34 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
}
if( childNodeName.equalsIgnoreCase( "price_list" ) )
{
mVal = genericUtility.getColumnValue( "price_list", dom );
mVal = genericUtility.getColumnValue( "price_list", dom );
retOpt = genericUtility.getColumnValue("ret_opt",dom1);
if(!"C".equalsIgnoreCase(retOpt))
{
sqlStr = " Select Count(*) cnt from pricelist where price_list = ? ";
pstmt = conn.prepareStatement( sqlStr );
sqlStr = " Select Count(*) cnt from pricelist where price_list = ? ";
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, mVal );
rs = pstmt.executeQuery();
if( rs.next() )
{
cnt = rs.getInt( "cnt" );
pstmt.setString( 1, mVal );
rs = pstmt.executeQuery();
if( rs.next() )
{
cnt = rs.getInt( "cnt" );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( cnt == 0 )
{
errCode = "VTPLIST1";
//errString = getErrorString( childNodeName, errCode, userId );
//break;
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( cnt == 0 )
{
errCode = "VTPLIST1";
//errString = getErrorString( childNodeName, errCode, userId );
//break;
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
}
if( childNodeName.equalsIgnoreCase( "ret_opt" ) )
{
......
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