Commit cef0cd56 authored by pchavan's avatar pchavan

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@209466 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0b39e026
......@@ -112,11 +112,13 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
tranDateStr = sdf.format(currentDate.getTime());
if (objCotext != null && objCotext.trim().length() > 0) {
if (objCotext != null && objCotext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objCotext);
}
switch (currentFormNo) {
switch (currentFormNo)
{
case 1:
System.out.println("VALIDATION FOR DETAIL [ 1 ]..........");
parentNodeList = dom.getElementsByTagName("Detail1");
......@@ -209,7 +211,8 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
}
}
}
/*else if (childNodeName.equalsIgnoreCase("invoice_id"))
//Changed By PriyankaC to remove validation from invoice_id and line_no field [START].
/* else if (childNodeName.equalsIgnoreCase("invoice_id"))
{
invoiceId = checkNull(genericUtility.getColumnValue("invoice_id", dom));
System.out.println("INSIDE INVOICE ID[" + invoiceId + "]");
......@@ -234,9 +237,8 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
errFields.add(childNodeName.toLowerCase());
}
}
}*/
/* else if (childNodeName.equalsIgnoreCase("line_no"))
}
else if (childNodeName.equalsIgnoreCase("line_no"))
{
invoiceId = checkNull(genericUtility.getColumnValue("invoice_id", dom));
lineNo = checkNull(genericUtility.getColumnValue("line_no", dom));
......@@ -265,7 +267,7 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
}
System.out.println("Testing done");
}*/
//Changed By PriyankaC to remove validation from invoice_id and line_no field [END].
else if (childNodeName.equalsIgnoreCase("cust_code"))
{
System.out.println("Testing pending");
......@@ -278,7 +280,7 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
}
if (custCode != null && custCode.trim().length() > 0)
{
sql = " SELECT COUNT(*) FROM customer WHERE cust_code = ? ";
sql = "SELECT COUNT(*) FROM customer WHERE cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
......@@ -331,7 +333,6 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
}
}
}
else if (childNodeName.equalsIgnoreCase("site_code"))
{
siteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
......@@ -364,14 +365,25 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
}
}
}
//ADD to check adj_qty and qty validation [start].
//Added By PriyankaC to check adj_qty and qty validation [start].
else if (childNodeName.equalsIgnoreCase("quantity_adj"))
{
quantityAdj = checkNull(genericUtility.getColumnValue("quantity_adj", dom));
quantity = checkNull(genericUtility.getColumnValue("quantity", dom));
qty = Double.parseDouble(quantity);
qtyAdj = Double.parseDouble(quantityAdj);
System.out.println("Value of quantity :" +qty +" [ qtyAdj ]" +qtyAdj);
System.out.println("Value of quantity :" +quantityAdj +" [ qtyAdj ]" +quantity);
if(quantity != null && quantity.trim().length() > 0)
{
qty= Double.parseDouble(quantity);
System.out.println("Value of quantity :"+qty) ;
}
if(quantityAdj != null && quantityAdj.trim().length() > 0 )
{
qtyAdj= Double.parseDouble(quantityAdj);
System.out.println("Value of quantity :"+qtyAdj) ;
}
System.out.println("Value of quantity FINAL :" +qty +" [ qtyAdj ]" +qtyAdj);
if (qtyAdj > qty)
{
errCode = "VTINADJQTY";
......@@ -379,10 +391,10 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
errFields.add(childNodeName.toLowerCase());
}
}
//ADD to check adj_qty and qty validation [end].
} // end of for
//Added By PriyankaC to check adj_qty and qty validation [end].
}
break ;
}// end of switch
}
int errListSize = errList.size();
cnt = 0;
String errFldName = null;
......@@ -404,6 +416,7 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
errString.indexOf("</Errors>"));
errStringXml.append(bifurErrString);
errString = "";
}
if (errorType.equalsIgnoreCase("E"))
{
......@@ -573,7 +586,7 @@ public class MinRateHistoryIC extends ValidatorEJB implements MinRateHistoryICLo
siteCode = genericUtility.getColumnValue("site_code", dom);
itemCode = genericUtility.getColumnValue("item_code", dom);
quantity = genericUtility.getColumnValue("quantity", dom);
invoiceId = genericUtility.getColumnValue("invoice_id", dom);
invoiceId= genericUtility.getColumnValue("invoice_id", dom);
valueXmlString.append("<lot_no protect =\"1\">").append("<![CDATA["+lotNo+"]]>").append("</lot_no>");
valueXmlString.append("<cust_code protect =\"1\">").append("<![CDATA["+custCode+"]]>").append("</cust_code>");
......
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