Commit aa74f2da authored by agaikwad's avatar agaikwad

Added order type Validation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105101 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c69e7493
...@@ -109,6 +109,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -109,6 +109,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
String stopBusiness = "", saleOption = "", contractReq = "", saleOptionItem = "", transer = "", specRef = ""; String stopBusiness = "", saleOption = "", contractReq = "", saleOptionItem = "", transer = "", specRef = "";
double advPerc = 0, total = 0, totalStd = 0, convQtyStduom = 0, convRtuomStduom = 0, commPerc1 = 0, quantity = 0, priceLst = 0, modQty = 0, minQty = 0, maxQty = 0, rate = 0, mrate = 0; double advPerc = 0, total = 0, totalStd = 0, convQtyStduom = 0, convRtuomStduom = 0, commPerc1 = 0, quantity = 0, priceLst = 0, modQty = 0, minQty = 0, maxQty = 0, rate = 0, mrate = 0;
String isContractYn="N"; String isContractYn="N";
String lsOrderType="";
double totOrdValue = 0, maxOrderValue = 0, orderValue = 0, orderValueO = 0; double totOrdValue = 0, maxOrderValue = 0, orderValue = 0, orderValueO = 0;
Date dueDate1 = null, drugDateUpto = null, drugLicNoUpto = null; Date dueDate1 = null, drugDateUpto = null, drugLicNoUpto = null;
Timestamp orderDate = null, dueDate = null, pDate = null, appFrom = null, validUpto = null, plDate = null, restUpto = null; Timestamp orderDate = null, dueDate = null, pDate = null, appFrom = null, validUpto = null, plDate = null, restUpto = null;
...@@ -138,6 +139,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -138,6 +139,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
PreparedStatement pstmt = null, pstmt1 = null; PreparedStatement pstmt = null, pstmt1 = null;
ResultSet rs = null, rs1 = null; ResultSet rs = null, rs1 = null;
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
FinCommon finCommon = new FinCommon(); FinCommon finCommon = new FinCommon();
double rateClg = 0, commPer1 = 0, commPerOn1 = 0, commPer2 = 0, commPer3 = 0, commPerOn3 = 0; double rateClg = 0, commPer1 = 0, commPerOn1 = 0, commPer2 = 0, commPer3 = 0, commPerOn3 = 0;
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
...@@ -265,7 +267,47 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -265,7 +267,47 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} }
} }
} else if (childNodeName.equalsIgnoreCase("contract_no")) }
else if(childNodeName.equalsIgnoreCase("order_type"))
{
System.out.println(">>>>>>>>>>Inside Order_Type>>>>>>>>>>>>>");
lsOrderType = checkNull(genericUtility.getColumnValue("order_type", dom));
if (lsOrderType == null || lsOrderType.trim().length() == 0)
{
errCode = "VMORTYBK";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if(lsOrderType != null && lsOrderType.trim().length()>0)
{
sql = "select count(*) as cnt from sordertype where order_type=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsOrderType);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt("cnt");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt==0)
{
errCode = "VTINVORD";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if (childNodeName.equalsIgnoreCase("contract_no"))
{ {
String lsContractNo = "", lsConf = "", lsStatus = ""; String lsContractNo = "", lsConf = "", lsStatus = "";
lsContractNo = checkNull(genericUtility.getColumnValue("contract_no", dom)); lsContractNo = checkNull(genericUtility.getColumnValue("contract_no", 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