Commit 004d0f4b authored by msaggam's avatar msaggam

2. In site customer sales_pers, sales_pers__1 and sales_pers__2 to be defaulted from customer.

3. In customer series sales_pers validation to based on itemser.sales_pers_yn flag (same as in sales order)

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@201308 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d6bfdaa5
...@@ -981,7 +981,7 @@ implements CustomerLocal, CustomerRemote ...@@ -981,7 +981,7 @@ implements CustomerLocal, CustomerRemote
} }
} }
//Changed by Mahesh Saggam on 29-05-2019[Start] // Changed by Mahesh Saggam on 29-05-2019 [Start]
/*else if (childNodeName.equalsIgnoreCase("sales_pers")) /*else if (childNodeName.equalsIgnoreCase("sales_pers"))
{ {
...@@ -1010,7 +1010,6 @@ implements CustomerLocal, CustomerRemote ...@@ -1010,7 +1010,6 @@ implements CustomerLocal, CustomerRemote
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
Comment By Nasruddin [16-SEP-16] START Comment By Nasruddin [16-SEP-16] START
else else
{ {
...@@ -1020,8 +1019,7 @@ implements CustomerLocal, CustomerRemote ...@@ -1020,8 +1019,7 @@ implements CustomerLocal, CustomerRemote
} }
Comment By Nasruddin [16-SEP-16] END Comment By Nasruddin [16-SEP-16] END
}*/ }*/
// Changed by Mahesh Saggam on 29-05-2019 [End]
//Changed by Mahesh Saggam on 29-05-2019[End]
else if (childNodeName.equalsIgnoreCase("sales_pers__1")) else if (childNodeName.equalsIgnoreCase("sales_pers__1"))
{ {
......
...@@ -10,6 +10,7 @@ package ibase.webitm.ejb.dis; ...@@ -10,6 +10,7 @@ package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.util.*; import java.util.*;
...@@ -25,6 +26,7 @@ import javax.ejb.Stateless; ...@@ -25,6 +26,7 @@ import javax.ejb.Stateless;
@Stateless @Stateless
public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCreditLocal,CustomerSerCreditRemote { public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCreditLocal,CustomerSerCreditRemote {
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
...@@ -59,6 +61,9 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit ...@@ -59,6 +61,9 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit
Node parentNode = null; Node parentNode = null;
Node childNode = null; Node childNode = null;
String itemSer = ""; String itemSer = "";
// Variables declared by Mahesh Saggam on 29-05-2019 [Start]
String siteCode = "", modName = "";
// Variables declared by Mahesh Saggam on 29-05-2019 [End]
String custCode = ""; String custCode = "";
String terrCode = ""; String terrCode = "";
String crTerm = ""; String crTerm = "";
...@@ -93,6 +98,10 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit ...@@ -93,6 +98,10 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit
conn = getConnection(); conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END //Changes and Commented By Bhushan on 09-06-2016 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
// Changes by Mahesh Saggam on 29-05-2019 [Start]
modName = ("w_" + getValueFromXTRA_PARAMS(xtraParams, "obj_name")).toUpperCase();
System.out.println("transer=============================" + modName);
// Changes by Mahesh Saggam on 29-05-2019 [End]
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
...@@ -192,7 +201,7 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit ...@@ -192,7 +201,7 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(childNodeName.equalsIgnoreCase("sales_pers")) /*if(childNodeName.equalsIgnoreCase("sales_pers"))
{ {
salesPers = genericUtility.getColumnValue("sales_pers", dom); salesPers = genericUtility.getColumnValue("sales_pers", dom);
sql = "select count(*) from sales_pers where sales_pers = ?"; sql = "select count(*) from sales_pers where sales_pers = ?";
...@@ -213,7 +222,57 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit ...@@ -213,7 +222,57 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
}*/
//sales_pers
// Changes by Mahesh Saggam on 29-05-2019 [Start]
if (childNodeName.equalsIgnoreCase("sales_pers"))
{
String mItemSer = "", lsSalesPersYn = "", orderDateStr = "";
salesPers = genericUtility.getColumnValue("sales_pers", dom);
mItemSer = genericUtility.getColumnValue("item_ser", dom);
if (salesPers != null && salesPers.trim().length() > 0)
{
siteCode = genericUtility.getColumnValue("site_code", dom);
orderDateStr = genericUtility.getColumnValue("order_date", dom);
errCode = finCommon.isSalesPerson(siteCode, salesPers, modName, conn);
}
else
{
sql = "select (case when sales_pers_yn is null then 'N' else sales_pers_yn end) as sales_pers_yn from itemser where item_ser =?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mItemSer);
rs = pstmt.executeQuery();
if (rs.next())
{
lsSalesPersYn = rs.getString("sales_pers_yn");
}
System.out.println("lsSalesPersYn = " + lsSalesPersYn);
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (lsSalesPersYn.equalsIgnoreCase("Y"))
{
errCode = "VMSLPERS1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
System.out.println(" Value for lsSalesPersYn = " + lsSalesPersYn );
}
if(salesPers == null || salesPers.trim().length() == 0)
{
errCode = "VMSALESPER";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
System.out.println(" Value for salesPers = " + salesPers);
}
}
} }
//Changed By Mahesh Saggam on 29-05-2019[End]
if(childNodeName.equalsIgnoreCase("sales_pers__1")) if(childNodeName.equalsIgnoreCase("sales_pers__1"))
{ {
salesPers1 = genericUtility.getColumnValue("sales_pers__1", dom); salesPers1 = genericUtility.getColumnValue("sales_pers__1", dom);
......
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