Commit 918667ae authored by mmhatre's avatar mmhatre

add validation for cust code end field in header and details screen

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210878 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 82547d85
...@@ -9638,6 +9638,28 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9638,6 +9638,28 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
setNodeValue(dom, "tax_env", getAbsString(taxEnvHdr)); setNodeValue(dom, "tax_env", getAbsString(taxEnvHdr));
} }
//added by manish mhatre on 31-oct-2019[For set the cust_name_end]
//start manish
else if (currentColumn.trim().equalsIgnoreCase("cust_code__end")){
String custName="",custCode="";
custCode = checkNull(genericUtility.getColumnValue("cust_code__end",dom));
sql="select cust_name from customer where cust_code= ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs=pstmt.executeQuery();
if(rs.next())
{
custName =rs.getString("cust_name");
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
valueXmlString.append("<cust_name__end>").append("<![CDATA[" + custName + "]]>").append("</cust_name__end>");
}
//end manish
valueXmlString.append("</Detail1>"); valueXmlString.append("</Detail1>");
break; break;
} }
...@@ -9969,13 +9991,20 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9969,13 +9991,20 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} else if (currentColumn.trim().equalsIgnoreCase("itm_default")) { } else if (currentColumn.trim().equalsIgnoreCase("itm_default")) {
String lsSiteCodeShip = "", dueDateStr = ""; String lsSiteCodeShip = "", dueDateStr = "";
String lsCommPercOnStr = ""; String lsCommPercOnStr = "";
String custNameEnd="",custCodeEnd=""; //added by manish mhatre on 31-oct-2019[for cust code end]
lsSaleOrd = checkNull(genericUtility.getColumnValue("sale_order", dom1)); lsSaleOrd = checkNull(genericUtility.getColumnValue("sale_order", dom1));
lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom1)); lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom1));
lsSiteCodeShip = checkNull(genericUtility.getColumnValue("site_code__ship", dom1)); lsSiteCodeShip = checkNull(genericUtility.getColumnValue("site_code__ship", dom1));
System.out.println("Ship site code in dtl" +lsSiteCodeShip); System.out.println("Ship site code in dtl" +lsSiteCodeShip);
lsPlistDisc = checkNull(genericUtility.getColumnValue("price_list__disc", dom1)); lsPlistDisc = checkNull(genericUtility.getColumnValue("price_list__disc", dom1));
custCodeEnd = checkNull(genericUtility.getColumnValue("cust_code__end",dom1)); //added by manish mhatre on 31-oct-2019[for cust code end]
custNameEnd=checkNull(genericUtility.getColumnValue("cust_name__end",dom1)); //added by manish mhatre on 31-oct-2019[for cust name end]
//added by manish mhatre on 31-oct-2019
//start manish
valueXmlString.append("<cust_code__end>").append("<![CDATA[" + custCodeEnd + "]]>").append("</cust_code__end>");
valueXmlString.append("<cust_name__end>").append("<![CDATA[" + custNameEnd + "]]>").append("</cust_name__end>");
//end manish
valueXmlString.append("<sale_order>").append("<![CDATA[" + lsSaleOrd + "]]>") valueXmlString.append("<sale_order>").append("<![CDATA[" + lsSaleOrd + "]]>")
.append("</sale_order>"); .append("</sale_order>");
//Changed By PriyankaC on 28SEP2018. //Changed By PriyankaC on 28SEP2018.
...@@ -12615,6 +12644,27 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12615,6 +12644,27 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
reStr = reStr.substring(0, pos); reStr = reStr.substring(0, pos);
valueXmlString.append(reStr); valueXmlString.append(reStr);
} }
//added by manish mhatre on 31-oct-2019[For set the cust_name_end]
//start manish
else if (currentColumn.trim().equalsIgnoreCase("cust_code__end")){
String custName="",custCode="";
custCode = checkNull(genericUtility.getColumnValue("cust_code__end",dom));
sql="select cust_name from customer where cust_code= ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs=pstmt.executeQuery();
if(rs.next())
{
custName =rs.getString("cust_name");
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
valueXmlString.append("<cust_name__end>").append("<![CDATA[" + custName + "]]>").append("</cust_name__end>");
}
//end manish
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
break; break;
case 3: case 3:
......
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