Commit c69e7493 authored by agaikwad's avatar agaikwad

checked black list YN in customer table


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105100 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 423f9e54
......@@ -312,6 +312,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (childNodeName.equalsIgnoreCase("cust_code"))
{
String mSiteCode = "", orderDateStr = "", lsItemser = "", blackListedYn = "", lsStopBusiness = "", lsAvailableYn = "", lsChannelPartner = "";
String blackListedCust="";
custCode = checkNull(genericUtility.getColumnValue("cust_code", dom));
mSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
orderDateStr = checkNull(genericUtility.getColumnValue("order_date", dom));
......@@ -340,25 +341,47 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
errCode = validator.isCustomer(mSiteCode, custCode, modName, conn);
if (errCode.trim().length() == 0)
{
sql = "select stop_business from customer where cust_code = ?";
/*sql = "select stop_business from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if (rs.next())
{
lsStopBusiness = checkNull(rs.getString("stop_business"));
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;*/
// Added by Abhijit on 21/03/2017
sql = "select stop_business ,black_listed from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if (rs.next())
{
lsStopBusiness = checkNull(rs.getString("stop_business"));
blackListedCust = checkNull(rs.getString("black_listed"));
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
// ended by Abhijit on 21/03/2017
if (lsStopBusiness.equalsIgnoreCase("Y"))
{
errCode = "VTICC";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
// Added by Abhijit on 21/03/2017
if ("Y".equalsIgnoreCase(blackListedCust))
{
errCode = "VTCUSTCD3";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
// ended by Abhijit on 21/03/2017
}
else
{
......
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