Commit ed858461 authored by pdas's avatar pdas

Request ID-D15ISUN003

Changes made for budget calculation for project


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99400 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 795ae350
...@@ -647,7 +647,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -647,7 +647,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
if(approxCost < totAmtPoamd) if(approxCost < totAmtPoamd)
{ {
System.out.println("In approxcost validation>>"); System.out.println("In approxcost validation>>");
errCode = "VTPROJCOST"; errCode = "VTPROJCNF";
errCode = new ValidatorEJB().getErrorString("", errCode, ""); errCode = new ValidatorEJB().getErrorString("", errCode, "");
System.out.println("::: errCode["+errCode+"]"); System.out.println("::: errCode["+errCode+"]");
......
...@@ -1352,6 +1352,27 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1352,6 +1352,27 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
* +totAmtDetIndent); * +totAmtDetIndent);
*/ */
/*sql = "select sum( a.tot_amt ) from porddet a, porder b"
+ " where ( a.purc_order = b.purc_order ) and b.confirmed = ''"
+ " and a.proj_code = ? and a.purc_order! = ? and b.status! = 'X'";
projCode = checkNull(genericUtility.getColumnValue("proj_code", dom));
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, projCode);
pstmt.setString(2, pordNo);
rs = pstmt.executeQuery();
if (rs.next())
{
totAmtDetpordertot = rs.getDouble(1);
System.out.println("totAmtDet for Porder without in loop>>>>>>>> "+ totAmtDetpordertot);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("totAmtDet for Porder outside loop>>>>>>>> "+ totAmtDetpordertot);
*/
sql = "select sum( a.tot_amt ) from porddet a, porder b" sql = "select sum( a.tot_amt ) from porddet a, porder b"
+ " where ( a.purc_order = b.purc_order ) and b.confirmed = 'Y'" + " where ( a.purc_order = b.purc_order ) and b.confirmed = 'Y'"
+ " and a.proj_code = ? and a.purc_order! = ? and b.status! = 'X'"; + " and a.proj_code = ? and a.purc_order! = ? and b.status! = 'X'";
...@@ -1494,7 +1515,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1494,7 +1515,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
sql2 ="select sum(a.tot_amt) from poamd_det a,poamd_hdr b " + /* sql2 ="select sum(a.tot_amt) from poamd_det a,poamd_hdr b " +
" where (a.purc_order = b.purc_order) and a.proj_code = ? " + " where (a.purc_order = b.purc_order) and a.proj_code = ? " +
" and a.amd_no ! = ?"; " and a.amd_no ! = ?";
projCode = checkNull(genericUtility.getColumnValue("proj_code", dom)); projCode = checkNull(genericUtility.getColumnValue("proj_code", dom));
...@@ -1517,12 +1538,12 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1517,12 +1538,12 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("totAmtDet for Porderamendment for total@@@@@@@>>>>>>>> "+ totAmtpoamd); System.out.println("totAmtDet for Porderamendment for total@@@@@@@>>>>>>>> "+ totAmtpoamd);*/
System.out.println("totAmtDetPoamdDetbrow>>"+ totAmtDetPoamdDetbrow); System.out.println("totAmtDetPoamdDetbrow>>"+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDet for poamd>>>>>>>> "+ totAmtDetPoamdDetbrow); System.out.println("totAmtDet for poamd>>>>>>>> "+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDet for porder>>>>>>>> "+ totAmtDetporder); System.out.println("totAmtDet for porder>>>>>>>> "+ totAmtDetporder);
//totAmtDetPoamdDetbrow = totAmtDetPoamdDetbrow *exchRatePoAmd; //totAmtDetPoamdDetbrow = totAmtDetPoamdDetbrow *exchRatePoAmd;
totAmtProj = totAmtDetPoamdDetbrow + totAmtDetporder+ totAmtDetpordertot +totAmtpoamd; totAmtProj = totAmtDetPoamdDetbrow + totAmtDetporder+ totAmtDetpordertot;
System.out.println("totAmtProj>>>>> "+ totAmtProj); System.out.println("totAmtProj>>>>> "+ totAmtProj);
if (totAmtProj > approxCost) if (totAmtProj > approxCost)
{ {
......
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