Commit d2e7964d authored by agaikwad's avatar agaikwad

Request_id-D14LSUN004


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97625 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b7b859c3
......@@ -108,7 +108,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
String projindNo="";
String ProjStatus="";
double rel_amt = 0, ord_amt = 0, tot_amt = 0, amount = 0, adv_amt = 0;
int line_no = 0, count = 0, row = 0;
int lineNoo = 0, count = 0, row = 0;
String type = "", task_code = "", rel_agnst = "", val = "", val1 = "",retval="";
double mmin_day = 0, mmax_day = 0, mmin_amt = 0, mmax_amt = 0;
......@@ -1855,71 +1855,71 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
String totamt1="";
//line_no =Integer.parseInt(genericUtility.getColumnValue("line_no", dom));
NodeList detail4List = dom.getElementsByTagName("Detail4");
String ordamt1=genericUtility.getColumnValue("ord_amt", dom);
ordamt1 = ordamt1 == null ? "0" : ordamt1.trim();
noOfParent = detail4List.getLength();
String ordamt1=checkNull(genericUtility.getColumnValue("ord_amt", dom1));
System.out.println("<ord_amt >@@@@@@ " + ordamt1);
//ordamt1 = ordamt1 != null && ordamt1.length() > 0 ? ordamt1.trim() : "0";
ord_amt =Double.parseDouble(ordamt1);
System.out.println("<ord_amt > " + ord_amt);
totamt1=genericUtility.getColumnValue("tot_amt", dom);
totamt1 = totamt1 == null ? "0" : totamt1.trim();
String totamt1=checkNull(genericUtility.getColumnValue("tot_amt", dom1));
//totamt1 = totamt1 == null ? "0" : totamt1.trim();
System.out.println("<tot_amt > @@@@@@@@@@@@@@@@@" + totamt1);
System.out.println("Total Amount"+totamt1);
tot_amt = Double.parseDouble(totamt1);
System.out.println("<tot_amt > " + tot_amt);
String lineno=genericUtility.getColumnValueFromNode("lineno", detail4List.item(ctr1));
lineno = lineno == null ? "0" : lineno.trim();
if( ( lineNoBrow==null || lineNoBrow.length()==0) && (!(lineNo == lineNoTemp )))
{
String lineno=checkNull(genericUtility.getColumnValueFromNode("line_no", detail4List.item(ctr1)));
//lineno = lineno == null ? "0" : lineno.trim();
lineNoo = Integer.parseInt(lineno);
System.out.println("Line Number"+lineNoo);
//line_no =Integer.parseInt(genericUtility.getColumnValue("line_no", dom));
System.out.println("Line Number"+lineno);
line_no = Integer.parseInt(lineno);
System.out.println("Line Number"+line_no);
noOfParent = detail4List.getLength();
}
System.out.println("noOfParent@@@@@@@@@@@"+noOfParent);
for (int a = 1; a <= noOfParent; a++)
int a=0;
for (a = 1; a <= noOfParent; a++)
{
System.out.println("noOfParent@@@@@@@@@@@"+noOfParent);
System.out.println("a@@@@ value"+a);
System.out.println("ctr1@@@@@@@@"+ctr1);
type = genericUtility.getColumnValueFromNode("amt_type", detail4List.item(ctr1));
retval = Double.toString(rel_amt);
retval = genericUtility.getColumnValueFromNode("rel_amt", detail4List.item(ctr1));
if (a != line_no)
System.out.println("Amount "+amount);
System.out.println("OrderAmount "+ord_amt);
System.out.println("TotalAmount "+tot_amt);
if (a != lineNoo)
{
if (type == "01")
if (type.equalsIgnoreCase("01"))
{
adv_amt = ord_amt * (rel_amt / 100);
}
else if (type == "02")
else if (type.equalsIgnoreCase("02"))
{
adv_amt = tot_amt * (rel_amt / 100);
adv_amt = tot_amt * (rel_amt/100);
}
else if (type == "03")
else if (type.equalsIgnoreCase("03"))
{
adv_amt = rel_amt;
}
System.out.println("Amount%%%%%%%"+amount);
amount = amount + adv_amt;
System.out.println("Amount allllll@@@@@@@@@ "+adv_amt);
System.out.println("Amount allllll@@@@@@@@@ "+amount);
}
}
type = genericUtility.getColumnValueFromNode("amt_type", dom);
retval = genericUtility.getColumnValueFromNode("rel_amt", dom);
if (ctr != line_no)
{
if (type == "01")
{
adv_amt = ord_amt * (rel_amt / 100);
} else if (type == "02") {
adv_amt = tot_amt * (rel_amt / 100);
} else if (type == "03") {
adv_amt = rel_amt;
}
amount = amount + adv_amt;
}
type = checkNull(genericUtility.getColumnValue("amt_type", dom));
System.out.println("Amount%%%%%%%"+amount);
System.out.println("Amount%%%%%%%"+tot_amt);
if (amount > tot_amt)
{
errCode = "POADVMIS";
......@@ -4146,7 +4146,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
valueXmlString.append("<task_code__o >").append("<![CDATA[" + task_code + "]]>").append("</task_code__o>");
}
else if (currentColumn.trim().equalsIgnoreCase("acct_code"))
/* else if (currentColumn.trim().equalsIgnoreCase("acct_code"))
{
purcOrder = genericUtility.getColumnValue("purc_order",dom1);
value = genericUtility.getColumnValue("acct_code", dom1);
......@@ -4168,7 +4168,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
}
// valueXmlString.append("<descr>").append("<![CDATA["+descr+"]]>").append("</descr>");
} else if (currentColumn.trim().equalsIgnoreCase("rel_agnst"))
}*/
else if (currentColumn.trim().equalsIgnoreCase("rel_agnst"))
{
value = genericUtility.getColumnValue("rel_agnst", dom);
......@@ -4200,6 +4201,28 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
break;
// //
case 5:
/* parentNodeList = dom.getElementsByTagName("Detail3");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
ctr = 0;
valueXmlString.append("<Detail3>");
childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if(childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild()!= null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
}
while(ctr < childNodeListLength && !childNodeName.equals(currentColumn));
System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'");
*/
parentNodeList = dom.getElementsByTagName("Detail5");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
......@@ -4209,17 +4232,17 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
do {
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if (childNodeName.equals(currentColumn)) {
if (childNode.getFirstChild() != null) {
columnValue = childNode.getFirstChild()
.getNodeValue().trim();
if (childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild() != null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
} while (ctr < childNodeListLength
&& !childNodeName.equals(currentColumn));
System.out.println("[" + currentColumn + "] ==> '"
+ columnValue + "'");
}
while (ctr < childNodeListLength&& !childNodeName.equals(currentColumn));
System.out.println("[" + currentColumn + "] ==> '"+ columnValue + "'");
if (currentColumn.trim().equalsIgnoreCase("itm_default"))
{
purcOrder = genericUtility.getColumnValue("purc_order", dom1);
......
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