Commit 5645935e authored by smanohar's avatar smanohar

Bill discounting posting error cheque amount does not match with invoice amount rectified

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213095 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ac189189
......@@ -1118,7 +1118,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
amount = (double) Double.parseDouble( "" + ADetMap.get("adj_amt"));
total = total + amount;
System.out.println("LINE NO 743"+total);
System.out.println("LINE NO 743"+total);
if(rcpClubPost.equals("Y"))
{
findIndex = findExistingIndex(DetList, acct, cctr, exch);
......@@ -2085,35 +2085,38 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
// if EPC adjusted in same currency then
//added by monika 8 aug-2019
System.out.println("before amount added with efund +++"+chq);
//System.out.println("before amount added with efund +++"+chq);
if(isEpcCurrSame == true)
{
chq = chq + ((double) Double.parseDouble( "" + RcpHdrMap.get("efundadj_amt"))) ;
}
//commented by monika -27 july-2019
System.out.println("chq and ["+chq+"] total ["+total + "] diff [" + Math.abs(chq - total ) +"]");
//System.out.println("chq and ["+chq+"] total ["+total + "] diff [" + Math.abs(chq - total ) +"]");
//if(Math.abs(chq - total) > 1)
//changes by monika-27 july-2019
System.out.println("chq and ["+chq+"] total ["+total + "] diff [" + Math.abs(chq - (total -taxAmt) ) +"]");
//System.out.println("chq and ["+chq+"] total ["+total + "] diff [" + Math.abs(chq - (total -taxAmt) ) +"]");
//if(Math.abs(chq - (total - taxAmt)) > 1)
//added by monika on 14 sept 2019 for accounting effect--
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+"]");
//System.out.println("bill discount amount and ["+billDiscountAmt+"] total::>>["+total+"]");
//to check validation for chq_amt and net_amt is 0 or not in receivables--8 nov 2019--by monika
//System.out.println("manohar 04-dec-2019 net_amt ["+total+"] net_amt__bc ["+totBc + "]");
if ((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")) != 0 && (double) Double.parseDouble( "" + RcpHdrMap.get("chq_amt")) != 0)
{//end
if(total>0) //to check billdiscounting accounting effect -07 nov -19
{
total=total-billDiscountAmt;
// chq=chq-billDiscountAmt;
//total=total-billDiscountAmt; commented 04-dec-2019 manoharan
chq=chq-billDiscountAmt; // uncommented 04-dec-2019 manoharan
//end
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) // 30-nov-2019 manoharan commented as this will not work chq and total are same
if(Math.abs(chq -(total -taxAmt)+othAmt) > 1)
if(Math.abs(chq -(total - taxAmt)+othAmt) > 1)
{
errString = itmDBAccessEJB.getErrorString("","VTRCPT8","","",conn);
conn.rollback();
......@@ -2138,7 +2141,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
RcpHdrMap.put("net_amt", total);
RcpHdrMap.put("net_amt__bc", totBc);
System.out.println("net_amt ["+total+"] net_amt__bc ["+totBc + "]");
//System.out.println("net_amt ["+total+"] net_amt__bc ["+totBc + "]");
System.out.println("manohar 04-dec-2019 size ["+ DetList.size() + "] list [" + DetList.toString() + "]");
// 14/01/14 manoharan details has to be inserted
sql = "select max(line_no) from rcpacct where tran_id = ?";
......
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