Commit 4b24676a authored by agaikwad's avatar agaikwad

Added if(excedAmt == 0.0 || excedAmt1.contains("-")) condition


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100290 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8ca064fc
...@@ -451,7 +451,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -451,7 +451,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
String specialInstr = "", benefitType = "", licenceNo = "", dutyPaid = "", formNo = "", lineNoPO = "", lineNoPO1 = ""; String specialInstr = "", benefitType = "", licenceNo = "", dutyPaid = "", formNo = "", lineNoPO = "", lineNoPO1 = "";
String lineNoTax = "", taxCode = "", taxBase = "", taxPerc = "", chgStat = "", taxSet = "", effect = "", acctCodeReco = ""; String lineNoTax = "", taxCode = "", taxBase = "", taxPerc = "", chgStat = "", taxSet = "", effect = "", acctCodeReco = "";
String cctrCodeReco = "", recoPerc = "", acctCode = "", cctrCode = "", rateType = "", round = "", roundTo = "", taxForm = ""; String cctrCodeReco = "", recoPerc = "", acctCode = "", cctrCode = "", rateType = "", round = "", roundTo = "", taxForm = "",excedAmt1="";
String acctCodeApAdv = "", cctrCodeApAdv = ""; // VALLABH KADAM Add two String acctCodeApAdv = "", cctrCodeApAdv = ""; // VALLABH KADAM Add two
// new field 19/NOV/14 // new field 19/NOV/14
String chgUser = "", chgTerm = "", posted = "", payTax = "", orderOpt = "", bom = "", oldItem = "", lastTermLine = "",lastTermLine1 = "", lineNoPOterm =""; String chgUser = "", chgTerm = "", posted = "", payTax = "", orderOpt = "", bom = "", oldItem = "", lastTermLine = "",lastTermLine1 = "", lineNoPOterm ="";
...@@ -827,12 +827,19 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -827,12 +827,19 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
excedAmt += totAmtpoamdtempold; excedAmt += totAmtpoamdtempold;
} }
System.out.println("@@@@@@@@@@ after excedAmt["+excedAmt+"]"); System.out.println("@@@@@@@@@@ after excedAmt["+excedAmt+"]");
System.out.println("excedAmt"+ excedAmt);
/* totAmtDetpordertot = totAmtDetpordertotNtc + totAmtDetpordertotPorcpConf - totAmtDetpordertotPorcpSer; excedAmt1=String.valueOf(excedAmt);
System.out.println( totAmtDetpordertotNtc +"-" +totAmtDetpordertotPorcpConf+"-"+ totAmtDetpordertotPorcpSer); System.out.println("excedAmt1"+excedAmt1);
System.out.println("Consumed Amount " + totAmtDetpordertot);*/ System.out.println("sumQtyamd"+ sumQtyamd);
/* Ended by Abhijit */ if(excedAmt == 0.0 || excedAmt1.contains("-"))
// if(excedAmt >0.0 || excedAmt1.contains("-") || totAmtDetPoamdDetbrow < sumQtyamd )
{
break;
}
else
{
totAmtPoamd = totAmtnotcurr + totAmtDetpordertot + totAmtpoamdtemp; totAmtPoamd = totAmtnotcurr + totAmtDetpordertot + totAmtpoamdtemp;
System.out.println("totamtpoamd>>>>.."+totAmtPoamd); System.out.println("totamtpoamd>>>>.."+totAmtPoamd);
System.out.println("totamtpordertot"+totAmtDetpordertot); System.out.println("totamtpordertot"+totAmtDetpordertot);
...@@ -873,6 +880,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -873,6 +880,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
} }
} }
}
rs.close(); rs.close();
rs = null; rs = null;
......
...@@ -1681,29 +1681,30 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1681,29 +1681,30 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
excedAmt1=String.valueOf(excedAmt); excedAmt1=String.valueOf(excedAmt);
System.out.println("excedAmt1"+excedAmt1); System.out.println("excedAmt1"+excedAmt1);
System.out.println("totAmtDetPoamdDetbrow"+ totAmtDetPoamdDetbrow); System.out.println("totAmtDetPoamdDetbrow"+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDetpordertot"+ sumQtyamd); System.out.println("sumQtyamd"+ sumQtyamd);
if( excedAmt == 0 || excedAmt1.contains("-") || totAmtDetPoamdDetbrow < sumQtyamd ) if(excedAmt == 0.0 || excedAmt1.contains("-"))
// if(excedAmt >0.0 || excedAmt1.contains("-") || totAmtDetPoamdDetbrow < sumQtyamd )
{ {
//System.out.println("Enter If COndition"); System.out.println("Enter If COndition");
//totAmtProj = totAmtDetpordertot-sumQtyamd; totAmtProj = totAmtDetpordertot-sumQtyamd;
//System.out.println("totAmtProj"+totAmtProj); System.out.println("totAmtProj"+totAmtProj);
// System.out.println("approxCost"+approxCost); System.out.println("approxCost"+approxCost);
//if (totAmtProj < approxCost) if (totAmtProj < approxCost)
//{ {
break; break;
//} }
} }
else else
{ {
System.out.println("totAmtDetPoamdDetbrow >>>>>>>> "+ totAmtDetPoamdDetbrow); System.out.println("totAmtDetPoamdDetbrow >>>>>>>> "+ totAmtDetPoamdDetbrow);
System.out.println("totAmtDetporder >>>>>>>> "+ totAmtDetporder); System.out.println("totAmtDetporder >>>>>>>> "+ totAmtDetporder);
System.out.println("totAmtDetpordertot>>>>>>>> "+ totAmtDetpordertot); System.out.println("totAmtDetpordertot>>>>>>>> "+ totAmtDetpordertot);
//totAmtDetPoamdDetbrow = totAmtDetPoamdDetbrow *exchRatePoAmd; //totAmtDetPoamdDetbrow = totAmtDetPoamdDetbrow *exchRatePoAmd;
totAmtProj = totAmtDetPoamdDetbrow + totAmtDetporder+ totAmtDetpordertot; totAmtProj = totAmtDetPoamdDetbrow + totAmtDetporder+ totAmtDetpordertot;
System.out.println("totAmtProj>>>>> "+ totAmtProj); System.out.println("totAmtProj>>>>> "+ totAmtProj);
if (totAmtProj > approxCost) if (totAmtProj > approxCost )
{ {
errCode = "VTPROJCOST"; errCode = "VTPROJCOST";
errList.add(errCode); errList.add(errCode);
...@@ -3188,8 +3189,10 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -3188,8 +3189,10 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
+" ; 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();
// +" ; Exceeded Amount : "+ BigDecimal.valueOf(totAmtDetpordertot - approxCost).toPlainString(); // +" ; Exceeded Amount : "+ BigDecimal.valueOf(totAmtDetpordertot - approxCost).toPlainString();
+" ; Exceeded Amount : "+ BigDecimal.valueOf(excedAmt).toPlainString(); //if( excedAmt > 0.0)
// {
+" ; Exceeded Amount : "+ BigDecimal.valueOf(excedAmt).toPlainString();
// }
System.out.println("Value ::: "+ value); System.out.println("Value ::: "+ value);
descrStart = descrStart.concat(value).concat(descrEnd); descrStart = descrStart.concat(value).concat(descrEnd);
errString = startStr.concat(descrStart).concat(endStr); errString = startStr.concat(descrStart).concat(endStr);
......
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