Commit 8ae33821 authored by msalla's avatar msalla

On confirmation of bank receipt coin difference error is coming.

This receipt is created for invoice for which bill discounting is done.(pont no:661)

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@209817 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 35db7f4c
...@@ -424,7 +424,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -424,7 +424,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
double amtRev = 0.0; double amtRev = 0.0;
double badAmt = 0.0; double badAmt = 0.0;
double totBc = 0.0,taxAmt=0.0; double totBc = 0.0,taxAmt=0.0;
double chq = 0.0,othAmt=0.0; double chq = 0.0,othAmt=0.0,billDiscountAmt=0.0;
int i = 0; int i = 0;
int cnt = 0 ; int cnt = 0 ;
int maxline = 0; int maxline = 0;
...@@ -1356,8 +1356,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -1356,8 +1356,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
if(advAmt!= 0) if(advAmt!= 0)
{ {
total = total + advAmt; total = total + advAmt;
System.out.println("LINE NO 874"+total); //System.out.println("LINE NO 874"+total);
System.out.println("total in adv"+total); // System.out.println("total in adv"+total);
acct = (String)RcpHdrMap.get("acct_code__adv")==null?"":(String)RcpHdrMap.get("acct_code__adv"); acct = (String)RcpHdrMap.get("acct_code__adv")==null?"":(String)RcpHdrMap.get("acct_code__adv");
cctr = (String)RcpHdrMap.get("cctr_code__adv")==null?" ":(String)RcpHdrMap.get("cctr_code__adv"); cctr = (String)RcpHdrMap.get("cctr_code__adv")==null?" ":(String)RcpHdrMap.get("cctr_code__adv");
exch = (double) Double.parseDouble( "" + RcpHdrMap.get("exch_rate")); exch = (double) Double.parseDouble( "" + RcpHdrMap.get("exch_rate"));
...@@ -1385,7 +1385,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -1385,7 +1385,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
rs=null; rs=null;
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
System.out.println("total in adv"+amtNoBankEffect); //System.out.println("total in adv"+amtNoBankEffect);
if (findIndex > -1) if (findIndex > -1)
{ {
detMap = (HashMap) DetList.get(findIndex); detMap = (HashMap) DetList.get(findIndex);
...@@ -2095,6 +2095,12 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -2095,6 +2095,12 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//if(Math.abs(chq - (total - taxAmt)) > 1) //if(Math.abs(chq - (total - taxAmt)) > 1)
//added by monika on 14 sept 2019 for accounting effect-- //added by monika on 14 sept 2019 for accounting effect--
othAmt=((double) Double.parseDouble( "" + RcpHdrMap.get("oth_amt"))); othAmt=((double) Double.parseDouble( "" + RcpHdrMap.get("oth_amt")));
//added by monika to 15 oct 19 -to check coin difference in billdiscounting
billDiscountAmt=((double) Double.parseDouble( "" + RcpHdrMap.get("bill_disc_amt")));
//System.out.println("bill discount amount and ["+billDiscountAmt+"] total::>>["+total+"]");
total=total-billDiscountAmt;
chq=chq-billDiscountAmt;
//end
// System.out.println("chq and ["+chq+"] total ["+total + "] other_amount ]"+othAmt+" ] diff [" + Math.abs(chq - (total -taxAmt)+othAmt ) +"]"); // System.out.println("chq and ["+chq+"] total ["+total + "] other_amount ]"+othAmt+" ] diff [" + Math.abs(chq - (total -taxAmt)+othAmt ) +"]");
if(Math.abs(chq - (total - taxAmt)+othAmt) > 1)//end if(Math.abs(chq - (total - taxAmt)+othAmt) > 1)//end
{ {
...@@ -2865,10 +2871,11 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -2865,10 +2871,11 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
if(isInBaseCurr == true) if(isInBaseCurr == true)
{ {
//netAmountBc = netAmountBc+taxAmt;//added by akhilesh on 31/july/13 for tax provision //netAmountBc = netAmountBc+taxAmt;//added by akhilesh on 31/july/13 for tax provision
//System.out.println("IN TRUE!!!!!!!!!!!!!!!!!"); System.out.println("IN TRUE!!!!!!!!!!!!!!!!!");
glTraceMap.put("curr_code", basecurrCode); glTraceMap.put("curr_code", basecurrCode);
glTraceMap.put("exch_rate", 1.0); glTraceMap.put("exch_rate", 1.0);
System.out.println("NET AMOUNT BC..["+RcpHdrMap.get("net_amt__bc"));
if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt__bc")) < 0 ) if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt__bc")) < 0 )
{ {
glTraceMap.put("dr_amt", 0.0); glTraceMap.put("dr_amt", 0.0);
...@@ -2884,10 +2891,12 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -2884,10 +2891,12 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
{ {
//netAmt = netAmt+taxAmt;//added by akhilesh on 31/july/13 for tax provision //netAmt = netAmt+taxAmt;//added by akhilesh on 31/july/13 for tax provision
//System.out.println("IN FALSE!!!!!!!!!!!!!!!!!"); System.out.println("IN FALSE!!!!!!!!!!!!!!!!!");
glTraceMap.put("curr_code", currCode); glTraceMap.put("curr_code", currCode);
glTraceMap.put("exch_rate", exchRate); glTraceMap.put("exch_rate", exchRate);
System.out.println("NET AMOUNT BC..["+RcpHdrMap.get("net_amt"));
if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")) < 0 ) if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")) < 0 )
{ {
glTraceMap.put("dr_amt", 0.0); glTraceMap.put("dr_amt", 0.0);
......
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