Commit f17a10b9 authored by arane's avatar arane

in-active item allowing to bill [Added validation]

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217725 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c8296c26
......@@ -127,6 +127,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
int childNodeListLength;
int ctr = 0;
int cnt = 0, llcnt = 0;
String chkActive ="";
String childNodeName = null;
String errString = "";
String errCode = "";
......@@ -256,7 +257,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
}
//end
//end
//end
lsContractNo = checkNull(genericUtility.getColumnValue("contract_no", dom));
if (lsContractNo != null && lsContractNo.trim().length() > 0) {
orderDate = Timestamp.valueOf(
......@@ -1685,11 +1686,32 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
rs = null;
pstmt.close();
pstmt = null;
if (cnt == 0) {
errCode = "VTITEM1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}else{//Added by Anagha Rane 11/03/2020 To check item is active or not and add validation for the same Start
sql = "select Active from item where item_code=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCodeOrd);
rs = pstmt.executeQuery();
if (rs.next()) {
chkActive = rs.getString("Active");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if ("N".equalsIgnoreCase(chkActive)) {
errCode = "VTITEM4";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
//Added by Anagha Rane 11/03/2020 To check item is active or not and add validation for the same End
}
} else if (childNodeName.equalsIgnoreCase("contract_no")) {
contractNo = checkNull(genericUtility.getColumnValue("contract_no", dom1));
......@@ -3543,7 +3565,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
}
//added by nandkumar gadkari on 28/05/19-----------------------end------------------------------
}
// ---------------------------- Nandkumar Gadkari -------------on 03/10/18----------end----------------------
// ---------------------------- Nandkumar Gadkari -------------on 03/10/18----------end----------------------
// unit
else if (childNodeName.equalsIgnoreCase("unit")) {
unit = checkNullandTrim(genericUtility.getColumnValue("unit", dom));
......@@ -5182,7 +5204,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
}
}
System.out.println("Inside OrderType itemchanged..."+lsOrderType);
// if (lsOrderType != null && lsOrderType.equalsIgnoreCase("NP")) { //commented by manish mhatre on 28-aug-2019
// if (lsOrderType != null && lsOrderType.equalsIgnoreCase("NP")) { //commented by manish mhatre on 28-aug-2019
if(lsOrderType != null && ordTypeFlag) { //end manish
sql = "select cr_term__np from customer_series where cust_code =? and item_ser = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -7466,8 +7488,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
.append("</emp_lname>");
}
//commented by mayur
// valueXmlString.append("<emp_code__ord1>").append("<![CDATA[" + lsEmpCodeOrd1 + "]]>")
// .append("</emp_code__ord1>");
// valueXmlString.append("<emp_code__ord1>").append("<![CDATA[" + lsEmpCodeOrd1 + "]]>")
// .append("</emp_code__ord1>");
if (lsEmpCodeOrd1 == null || lsEmpCodeOrd1.trim().length() == 0) {
//added by mayur on 23-May-18 --start
System.out.println("mayur nair456"+lsEmpCodeOrd1);
......@@ -7475,10 +7497,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
valueXmlString.append("<employee_emp_fname><![CDATA[]]></employee_emp_fname>");
valueXmlString.append("<employee_emp_lname><![CDATA[]]></employee_emp_lname>");
//added by mayur on 23-May-18 ---end
// valueXmlString.append("<employee_emp_fname>").append("<![CDATA[]]>")
// .append("</employee_emp_fname>");
// valueXmlString.append("<employee_emp_lname>").append("<![CDATA[]]>")
// .append("</employee_emp_lname>");
// valueXmlString.append("<employee_emp_fname>").append("<![CDATA[]]>")
// .append("</employee_emp_fname>");
// valueXmlString.append("<employee_emp_lname>").append("<![CDATA[]]>")
// .append("</employee_emp_lname>");
} else {
System.out.println("mayur nair654"+lsEmpCodeOrd1);
//added by mayur on 23-May-18 --start
......@@ -8431,9 +8453,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
//commented by manish mhatre on 10-sep-2019[for set dlv cust code in customer master ]
//start manish
// valueXmlString.append("<cust_code__dlv>").append("<![CDATA[" + custCode + "]]>")
// .append("</cust_code__dlv>");
// setNodeValue(dom, "cust_code__dlv", getAbsString(custCode));
// valueXmlString.append("<cust_code__dlv>").append("<![CDATA[" + custCode + "]]>")
// .append("</cust_code__dlv>");
// setNodeValue(dom, "cust_code__dlv", getAbsString(custCode));
//end manish // Start added by chandrashekar
// 10-aug-2016
......@@ -18363,7 +18385,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
}
//chargeQty = unConfTotChargeQty + prvChargeQty + totChargeQty + ConfTotChargeQty;
// chargeTotamt =
// chargeTotamt =
System.out.println(
"final prvChargeQty insdie c" + prvChargeQty + "prvFreeQty" + prvFreeQty + "]");
......
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