Commit 6e2ea0ff authored by agaikwad's avatar agaikwad

Added if( excedAmt == 0 || excedAmt1.contains("-") ||totAmtDetPoamdDetbrow < sumQtyamd )


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100282 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ba33ad3f
......@@ -1512,6 +1512,9 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
System.out.println("NO OF PARENT@@@@"+ noOfParent);
int countqty=0;
a = 0;
String excedAmt1="";
double chekAMt=0;
String chekAMt1="";
projCode = checkNull(genericUtility.getColumnValue("proj_code", dom));
System.out.println("projCode>>>>" + projCode);
......@@ -1572,15 +1575,16 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
System.out.println("Sum Quamtity String" + sumqty);
sumQtyamd = totAmtDetPoamdDetbrowtemp - sumQtyamd;
System.out.println("sumQtyamd" + sumQtyamd);
if(sumqty.contains("-"))
sumqty= String.valueOf(sumQtyamd);
/*if(sumqty.contains("-"))
{
System.out.println("INNNNNN");
sumQtyamd = sumQtyamd * (-1);
System.out.println("IN MINUS " + sumQtyamd);
}
}*/
System.out.println("ABhi testing add old qty" + sumQtyamd);
countqty++;
//countqty++;
System.out.println("linenoOrdBrow>>>["+linenoOrdBrow+"]a["+a+"]" );
if((linenoOrdBrow == null || "@".equalsIgnoreCase(linenoOrdBrow) || "".equalsIgnoreCase(linenoOrdBrow) || linenoOrdBrow.trim().length()==0 ) && firstNull== true)
......@@ -1596,6 +1600,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
excedAmt += sumQtyamd;
}
System.out.println("@@@@@@@@@@ after excedAmt["+excedAmt+"]");
System.out.println("excedAmt is "+excedAmt);
/* if(countqty > 1)
{
excedAmt = sumQtyamd + totAmtDetpordertot - approxCost;
......@@ -1646,7 +1652,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
rs = null;
pstmt.close();
pstmt = null;
}*/
}
/* sql2 ="select sum(a.tot_amt) from poamd_det a,poamd_hdr b " +
" where (a.purc_order = b.purc_order) and a.proj_code = ? " +
" and a.amd_no ! = ?";
......@@ -1671,12 +1677,32 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
pstmt.close();
pstmt = null;
System.out.println("totAmtDet for Porderamendment for total@@@@@@@>>>>>>>> "+ totAmtpoamd);*/
System.out.println("totAmtDetPoamdDetbrow>>"+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDet for poamd>>>>>>>> "+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDet for porder>>>>>>>> "+ totAmtDetporder);
System.out.println("excedAmt"+ excedAmt);
excedAmt1=String.valueOf(excedAmt);
System.out.println("excedAmt1"+excedAmt1);
System.out.println("totAmtDetPoamdDetbrow"+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDetpordertot"+ sumQtyamd);
if( excedAmt == 0 || excedAmt1.contains("-") || totAmtDetPoamdDetbrow < sumQtyamd )
{
//System.out.println("Enter If COndition");
//totAmtProj = totAmtDetpordertot-sumQtyamd;
//System.out.println("totAmtProj"+totAmtProj);
// System.out.println("approxCost"+approxCost);
//if (totAmtProj < approxCost)
//{
break;
//}
}
else
{
System.out.println("totAmtDetPoamdDetbrow >>>>>>>> "+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDetporder >>>>>>>> "+ totAmtDetporder);
System.out.println("totAmtDetpordertot>>>>>>>> "+ totAmtDetpordertot);
//totAmtDetPoamdDetbrow = totAmtDetPoamdDetbrow *exchRatePoAmd;
totAmtProj = totAmtDetPoamdDetbrow + totAmtDetporder+ totAmtDetpordertot;
System.out.println("totA mtProj>>>>> "+ totAmtProj);
System.out.println("totAmtProj>>>>> "+ totAmtProj);
if (totAmtProj > approxCost)
{
errCode = "VTPROJCOST";
......@@ -1715,6 +1741,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
}*/
}
}
}
}
else if(ValueType == false)
......
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