Commit ad76bbea authored by vkadam's avatar vkadam

Change to handel rounding issue at 'VTBAL1'


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103754 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 92c82a2c
......@@ -2439,7 +2439,8 @@ if(! isPreview)//if isPreview is false
System.out.println("net_amt AND net_amt__bc 1"+RcpHdrMap.get("net_amt")+""+RcpHdrMap.get("net_amt__bc"));
tranId = (String)RcpHdrMap.get("tran_id");
tranType = (String)RcpHdrMap.get("tran_type");
if(tranType.equalsIgnoreCase("J"))
// if(tranType.equalsIgnoreCase("J"))
if("J".equalsIgnoreCase(tranType))
{
if((double) Double.parseDouble( "" + RcpHdrMap.get("adv_amt")) != 0 && (double) Double.parseDouble( "" + RcpHdrMap.get("chq_amt")) != 0)
......@@ -3283,8 +3284,9 @@ if(! isPreview)//if isPreview is false
}
System.out.println("last ...........");
System.out.println("last ...........3316");
}
System.out.println("@V@ isPreview :- ["+isPreview+"]");
if(! isPreview) // if isPreview is false ****vishakha
{
for (int ctr =0; ctr < RcpDetList.size(); ctr++)
......@@ -3331,8 +3333,15 @@ if(! isPreview)//if isPreview is false
pstmt.close();
pstmt = null;
System.out.println("05/04/14 manoharan totAmt [" + totAmt + "] adjAmt [ " + adjAmt + "] amount [" + amount + "] Math.abs(totAmt - adjAmt) [" + Math.abs(totAmt - adjAmt) + "] Math.abs(amount) [" + Math.abs(amount) + "]");
if(getReqDecimal(Math.abs(totAmt - adjAmt),2) < getReqDecimal(Math.abs(amount),2))
System.out.println("05/04/14 manoharan totAmt [" + totAmt + "] adjAmt [ " + adjAmt + "] amount [" + amount + "]" +
" Math.abs(totAmt - adjAmt) [" + Math.abs(totAmt - adjAmt) + "] Math.abs(amount) [" + Math.abs(amount) + "]");
double tempAmt=distCommon.getRequiredDecimal(Math.abs(totAmt - adjAmt), 3);
System.out.println("@V@ TempAmt :- ["+tempAmt+"]");
System.out.println("@V@ getReqDecimal(tempAmt,2) :- ["+getReqDecimal(tempAmt,2)+"]");
System.out.println("@V@ getReqDecimal(Math.abs(amount),2) :- ["+getReqDecimal(Math.abs(amount),2)+"]");
// if(getReqDecimal(Math.abs(totAmt - adjAmt),2) < getReqDecimal(Math.abs(amount),2))
if(getReqDecimal(tempAmt,2) < getReqDecimal(Math.abs(amount),2))
{
errString = itmDBAccessEJB.getErrorString("","VTBAL1","","",conn);
return errString;
......@@ -3428,8 +3437,12 @@ if(! isPreview)//if isPreview is false
pstmt = null;
System.out.println("05/04/14 manoharan 2 adjAmt [ " + adjAmt + "] amount [" + amount + "] Math.abs(amount - adjAmt) [" + Math.abs(amount - adjAmt) + "] Math.abs(adjAmt) [" + Math.abs(adjAmt) + "]");
if(getReqDecimal(Math.abs(amount - adjAmt),2) < getReqDecimal(Math.abs(adjAmt),2))
double tempAmt=distCommon.getRequiredDecimal(Math.abs(amount - adjAmt), 3);
System.out.println("@V@ TempAmt :- ["+tempAmt+"]");
System.out.println("@V@ getReqDecimal(tempAmt,2) :- ["+getReqDecimal(tempAmt,2)+"]");
System.out.println("@V@ getReqDecimal(Math.abs(adjAmt),2) :- ["+getReqDecimal(Math.abs(adjAmt),2)+"]");
// if(getReqDecimal(Math.abs(amount - adjAmt),2) < getReqDecimal(Math.abs(adjAmt),2))
if(getReqDecimal(tempAmt,2) < getReqDecimal(Math.abs(adjAmt),2))
{
errString = itmDBAccessEJB.getErrorString("","VTBAL1","","",conn);
}
......@@ -3524,7 +3537,12 @@ if(! isPreview)//if isPreview is false
pstmt = null;
System.out.println("05/04/14 manoharan 3 adjAmt [ " + adjAmt + "] amount [" + amount + "] Math.abs(amount - adjAmt) [" + Math.abs(amount - adjAmt) + "] Math.abs(amount) [" + Math.abs(amount) + "]");
if(getReqDecimal(Math.abs(amount - adjAmt),2) < getReqDecimal(Math.abs(amount),2))
double tempAmt=distCommon.getRequiredDecimal(Math.abs(amount - adjAmt), 3);
System.out.println("@V@ TempAmt :- ["+tempAmt+"]");
System.out.println("@V@ getReqDecimal(tempAmt,2) :- ["+getReqDecimal(tempAmt,2)+"]");
System.out.println("@V@ getReqDecimal(Math.abs(amount),2) :- ["+getReqDecimal(Math.abs(amount),2)+"]");
// if(getReqDecimal(Math.abs(amount - adjAmt),2) < getReqDecimal(Math.abs(amount),2))
if(getReqDecimal(tempAmt,2) < getReqDecimal(Math.abs(amount),2))
{
errString = itmDBAccessEJB.getErrorString("","VTBAL1","","",conn);
return errString;
......
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