Commit 6db0a23b authored by caluka's avatar caluka

Release amount greater than zero validation added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98350 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c8bf3a06
......@@ -1918,8 +1918,13 @@ public class MilestonePayGen
vocherAmt = Double.parseDouble(vocherAmtStr);
milestoneAmt = Double.parseDouble(milestoneAmtStr);
differenceAmt=ordAmt-(vocherAmt+milestoneAmt);
sql = "select ord_amt,tot_amt,tax_amt from porder where purc_order= ? " ;
if(relAmtFinal<=0)
{
result = "RELAMTZERO";
return result;
}else
{
sql = "select ord_amt,tot_amt,tax_amt from porder where purc_order= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
rs = pstmt.executeQuery();
......@@ -1934,36 +1939,37 @@ public class MilestonePayGen
pstmt.close();
pstmt = null;
System.out.println("odtAmt :" + odtAmt);
System.out.println("tot_amt :" + totAmt);
System.out.println("taxAmt :" + taxAmt);
System.out.println("amtType ::::" + amtType);
System.out.println("odtAmt :"+odtAmt);
System.out.println("tot_amt :"+totAmt);
System.out.println("taxAmt :"+taxAmt);
System.out.println("amtType ::::"+amtType);
if(amtType.equalsIgnoreCase("01")) // % of base
if (amtType.equalsIgnoreCase("01")) // % of base
{
calRelAmt=(odtAmt * Double.parseDouble(relAmt))/100;
}
else if(amtType.equalsIgnoreCase("02")) // % of net
calRelAmt = (odtAmt * Double.parseDouble(relAmt)) / 100;
} else if (amtType.equalsIgnoreCase("02")) // % of
// net
{
calRelAmt=(totAmt * Double.parseDouble(relAmt))/100;
}
else if (amtType.equalsIgnoreCase("03"))// fixed amount
calRelAmt = (totAmt * Double.parseDouble(relAmt)) / 100;
} else if (amtType.equalsIgnoreCase("03"))// fixed
// amount
{
calRelAmt=Double.parseDouble(relAmt);
}
else if(amtType.equalsIgnoreCase("04"))// % of full tax
calRelAmt = Double.parseDouble(relAmt);
} else if (amtType.equalsIgnoreCase("04"))// % of
// full
// tax
{
calRelAmt = (totAmt * Double.parseDouble(relAmt))/100 + taxAmt;
calRelAmt = (totAmt * Double.parseDouble(relAmt)) / 100 + taxAmt;
}
System.out.println("calRelAmt>>>>>>"+calRelAmt);
System.out.println("differenceAmt>>>>>>"+differenceAmt);
if(calRelAmt > differenceAmt)
System.out.println("calRelAmt>>>>>>" + calRelAmt);
System.out.println("differenceAmt>>>>>>" + differenceAmt);
if (calRelAmt > differenceAmt)
{
result = "RELAMTGRT";
return result;
}
}
}
}
if(dueDate == null || dueDate.trim().length() == 0 )
......
......@@ -485,6 +485,11 @@ function getInfo()
alert("Release Amount is greater than Order Amount-(Vocher Amount +Pending Approval)!");
document.getElementById("Detail2.1.rel_amt").focus();
}
if(tet == "RELAMTZERO")
{
alert("Release Amount should be greater than zero!");
document.getElementById("Detail2.1.rel_amt").focus();
}
if(tet == "LINEPREV")
{
alert("Please input numeric characters only !");
......
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