Commit 34552692 authored by pchavan's avatar pchavan

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@185790 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b48929d8
...@@ -75,7 +75,7 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost ...@@ -75,7 +75,7 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
int childNodeLength = 0; int childNodeLength = 0;
int currentFormNo=0; int currentFormNo=0;
int ctr=0,cnt=0; int ctr=0,cnt=0;
double totalPer ,crntPer; double totalPer ,crntPer , percentage;
Connection conn = null; Connection conn = null;
ConnDriver connDriver = null; ConnDriver connDriver = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -580,30 +580,46 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost ...@@ -580,30 +580,46 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
NodeList detailNoteList = dom2.getElementsByTagName("Detail2"); NodeList detailNoteList = dom2.getElementsByTagName("Detail2");
int detlCnt = detailNoteList.getLength(); int detlCnt = detailNoteList.getLength();
System.out.println("DETAIL COUNT" +detlCnt); System.out.println("DETAIL COUNT" +detlCnt);
if(detlCnt >=2)
{
totalPer = getNumOftotalallocPercentage( dom2 ,CurrentLineNo); totalPer = getNumOftotalallocPercentage( dom2 ,CurrentLineNo);
System.out.println("TOTAL AMOUNT..." +totalPer); System.out.println("TOTAL AMOUNT..." +totalPer);
double remAmt = 100 - totalPer; percentage = totalPer + crntPer ;
if(crntPer > remAmt) /*if(percentage > 100)
{ {
System.out.println("EXCEED AMOUNT..." +remAmt); System.out.println("EXCEED AMOUNT..." +percentage);
errCode = "OVERALLINV"; errCode = "OVERALLINV";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
}
} }*/
else /*else if(percentage < 100)
{
System.out.println("AMOUNT..." +percentage);
errCode = "VTRCONT2";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}*/
/*else
{ {
if(crntPer > 100) if(crntPer > 100)
{ {
System.out.println("AMOUNT..." +crntPer); System.out.println("EXCEED AMOUNT..." +crntPer);
errCode = "OVERALLINV"; errCode = "OVERALLINV";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else if (crntPer < 100)
} {
System.out.println("AMOUNT..." +crntPer);
errCode = "VTRCONT2";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}*/
} }
} }
} }
...@@ -1330,13 +1346,17 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost ...@@ -1330,13 +1346,17 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
for(int cnt = 0;cnt<detailNoteList.getLength();cnt++) for(int cnt = 0;cnt<detailNoteList.getLength();cnt++)
{ {
Element pNode=(Element) detailNoteList.item(cnt); Element pNode=(Element) detailNoteList.item(cnt);
System.out.println("Node length :" +detailNoteList.getLength());
perAmt= pNode.getElementsByTagName("alloc_perc").item(0).getFirstChild().getNodeValue(); perAmt= pNode.getElementsByTagName("alloc_perc").item(0).getFirstChild().getNodeValue();
System.out.println("Node VAlue :" +pNode.getElementsByTagName("alloc_perc").item(0).getFirstChild().getNodeValue());
lineNo= pNode.getElementsByTagName("line_no").item(0).getFirstChild().getNodeValue(); lineNo= pNode.getElementsByTagName("line_no").item(0).getFirstChild().getNodeValue();
System.out.println("Node line_no :" +pNode.getElementsByTagName("line_no").item(0).getFirstChild().getNodeValue());
updateFlag = getAttributeVal(detailNoteList.item(cnt),"updateFlag"); updateFlag = getAttributeVal(detailNoteList.item(cnt),"updateFlag");
System.out.println("updateFlag :" +updateFlag); System.out.println("updateFlag :" +updateFlag);
if(!("D".equalsIgnoreCase(updateFlag))) if(!("D".equalsIgnoreCase(updateFlag)))
{ {
if(!lineNo.equalsIgnoreCase(CurrentLineNo.trim())) if(!lineNo.trim().equalsIgnoreCase(CurrentLineNo.trim()))
{ {
System.out.println("Line No is.. "+CurrentLineNo); System.out.println("Line No is.. "+CurrentLineNo);
num += Double.parseDouble(perAmt); num += Double.parseDouble(perAmt);
......
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