Commit 8b49cca6 authored by agaikwad's avatar agaikwad

Request id-D15ISUN003


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101042 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3ac4a63a
...@@ -1400,13 +1400,13 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1400,13 +1400,13 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = "select sum( a.tot_amt * b.exch_rate) from porddet a, porder b" sql = "select sum(a.tot_amt * b.exch_rate) from porddet a, porder b"
+ " where ( a.purc_order = b.purc_order ) and b.confirmed = 'Y' and a.proj_code = ? and b.status! = 'X' and a.status! ='C'" ; + " where (a.purc_order = b.purc_order ) and b.confirmed = 'Y' and a.proj_code = ? and b.status! = 'X' and a.status! ='C' and a.purc_order! = ?";
projCode = checkNull(genericUtility.getColumnValue("proj_code", dom)); projCode = checkNull(genericUtility.getColumnValue("proj_code", dom));
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, projCode); pstmt.setString(1, projCode);
// pstmt.setString(2, pordNo); pstmt.setString(2, pordNo);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
...@@ -1542,7 +1542,11 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1542,7 +1542,11 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
System.out.println("ABhi testing add old qty" + sumQtyamd); System.out.println("ABhi testing add old qty" + sumQtyamd);
System.out.println("linenoOrdBrow>>>["+linenoOrdBrow+"]a["+a+"]" ); System.out.println("linenoOrdBrow>>>["+linenoOrdBrow+"]a["+a+"]" );
if((linenoOrdBrow == null || "@".equalsIgnoreCase(linenoOrdBrow) || "".equalsIgnoreCase(linenoOrdBrow) || linenoOrdBrow.trim().length()==0 ) && firstNull== true) if(linenoOrdBrow == null || linenoOrdBrow.trim().length() == 0)
{
linenoOrdBrow ="@";
}
/*if((linenoOrdBrow == null || "@".equalsIgnoreCase(linenoOrdBrow) || "".equalsIgnoreCase(linenoOrdBrow) || linenoOrdBrow.trim().length()==0 ) && firstNull== true)
{ {
firstNull=false; firstNull=false;
System.out.println("totAmtDetPoamdDetbrowtemp@@@@@@@@" +totAmtDetPoamdDetbrowtemp); System.out.println("totAmtDetPoamdDetbrowtemp@@@@@@@@" +totAmtDetPoamdDetbrowtemp);
...@@ -1569,15 +1573,60 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1569,15 +1573,60 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
{ {
excedAmtFlag=false; excedAmtFlag=false;
}*/ }*/
System.out.println("@@@@@@@@@@ excedAmtFlag["+excedAmtFlag+"]"); System.out.println("@@@@@@@@@@ linenoOrdBrow["+linenoOrdBrow+"]");
temparr = temparr + linenoOrdBrow +",";
} }
} }
System.out.println("tottemp >>>>>>>> "+ tottemp); System.out.println("temparr" +temparr);
if(temparr.length() >0)
{
String tempArray[]=temparr.split(",");
System.out.println("tempArray[].length :-["+tempArray.length+"]");
System.out.println("line!!!!"+line);
line1 ="";
for( itrArr=0; itrArr < tempArray.length;itrArr++)
{
line1=line1+"'"+tempArray[itrArr]+"',";
}
System.out.println("line1 before sql:- ["+line1+"]");
line1=line1.substring(0, line1.length()-1);
sql1 = "select sum(a.tot_amt * b.exch_rate) " +
"from porddet a, porder b"
+ " where ( a.purc_order = b.purc_order ) and b.confirmed = 'Y'"
+ " and a.proj_code = ? and a.purc_order = ? and line_no NOT IN ( "+ line1 +") and a.status! ='C'";
projCode = checkNull(genericUtility.getColumnValue("proj_code",dom));
pstmt = conn.prepareStatement(sql1);
pstmt.setString(1, projCode);
pstmt.setString(2, pordNo);
System.out.println("pordNo is....."+ pordNo);
System.out.println("Project code is....."+ projCode);
rs = pstmt.executeQuery();
while (rs.next())
{
totAmtDetpordertempstr = rs.getString(1);
totAmtDetpordertempstr = totAmtDetpordertempstr != null && totAmtDetpordertempstr.trim().length() > 0 ? totAmtDetpordertempstr.trim() : "0.0";
totAmtDetpordertemp = Double.parseDouble(totAmtDetpordertempstr);
totAmtDetporder = totAmtDetporder + totAmtDetpordertemp;
System.out.println("totAmtDet for Porder in loop>>>>>>>> "+ totAmtDetporder);
}
}
System.out.println("totAmtDetpordertot>>>>>>>> "+ totAmtDetpordertot); System.out.println("totAmtDetpordertot>>>>>>>> "+ totAmtDetpordertot);
//totAmtDetPoamdDetbrow = totAmtDetPoamdDetbrow *exchRatePoAmd; System.out.println("totAmtDetPoamdDetbrow >>>>>>>> "+ totAmtDetPoamdDetbrow);
totAmtProj = totAmtDetpordertot + tottemp; System.out.println("totAmtDetpordertemp>>>>>>>> "+ totAmtDetpordertemp);
totAmtProj = totAmtDetpordertot + +totAmtDetPoamdDetbrow + totAmtDetpordertemp;
System.out.println("totAmtProj>>>>> "+ totAmtProj); System.out.println("totAmtProj>>>>> "+ totAmtProj);
System.out.println("@@@@@@@@@@ excedAmtFlag222["+excedAmtFlag+"]"); System.out.println("@@@@@@@@@@ excedAmtFlag222["+excedAmtFlag+"]");
if (totAmtProj > approxCost) if (totAmtProj > approxCost)
...@@ -3061,7 +3110,9 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -3061,7 +3110,9 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
System.out.println("<sumQtyamd + totAmtDetpordertot IN ERROR MESSAGE > @@@@@@@@@@@@@@@@@"+ totAmtDetPoamdDetbrow + totAmtDetporder); System.out.println("<sumQtyamd + totAmtDetpordertot IN ERROR MESSAGE > @@@@@@@@@@@@@@@@@"+ totAmtDetPoamdDetbrow + totAmtDetporder);
value = " ; Amount Exceeded Project Code : " + projCode + value = " ; Amount Exceeded Project Code : " + projCode +
";Project Aprroved Amount : "+ BigDecimal.valueOf(approxCost).toPlainString() ";Project Aprroved Amount : "+ BigDecimal.valueOf(approxCost).toPlainString()
+" ;Consumed Amount : "+ BigDecimal.valueOf(totAmtDetpordertot).toPlainString() //+" ;Consumed Amount : "+ BigDecimal.valueOf(totAmtDetpordertot).toPlainString()
+" ;Consumed Amount : "+ BigDecimal.valueOf(totAmtProj).toPlainString()
//totAmtProj
//+" ; Current Purchase Amendment Amount : "+ BigDecimal.valueOf(totAmtDetPoamdDetbrow + totAmtDetporder ).toPlainString() //+" ; Current Purchase Amendment Amount : "+ BigDecimal.valueOf(totAmtDetPoamdDetbrow + totAmtDetporder ).toPlainString()
+" ; Current Purchase Amendment Amount : "+ BigDecimal.valueOf(totAmtDetPoamdDetbrow).toPlainString() +" ; Current Purchase Amendment Amount : "+ BigDecimal.valueOf(totAmtDetPoamdDetbrow).toPlainString()
//+" ; Exceeded Amount : "+ BigDecimal.valueOf( sumQtyamd + totAmtDetpordertot - approxCost).toPlainString(); //+" ; Exceeded Amount : "+ BigDecimal.valueOf( sumQtyamd + totAmtDetpordertot - approxCost).toPlainString();
......
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