Commit 8e1f7b5d authored by msalla's avatar msalla

:On confirmation of receipt dishonor system is giving error of coin difference...

:On confirmation of receipt dishonor system is giving error of coin difference error. the receipt includes packing credit adjustment and taxes in details

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@212457 ce508802-f39f-4f6c-b175-0d175dae99d5
parent faa28761
......@@ -120,7 +120,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
public String confirm(String tranId,String xtraParams,String forcedFlag, Connection conn, boolean isPreview) throws RemoteException,ITMException
{
//System.out.println("confirm called........");
System.out.println("confirm called........");
String sql = "";
String confirm = "";
String siteCode = "";
......@@ -203,7 +203,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
rs = null;
pstmt.close();
pstmt = null;
//System.out.println("Printing loginEmpCode---2-----"+loginEmpCode+"--");
System.out.println("Printing loginEmpCode---2-----"+loginEmpCode+"--");
}
......@@ -360,7 +360,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
private String gbfRetrieveReceipt(String tranId,String siteCode,String xtraParams,Connection conn,boolean isPreview)throws RemoteException,ITMException
{
//System.out.println("gdf Retrieve Receipt Called...........");
System.out.println("gdf Retrieve Receipt Called...........");
String errString = "";
String sundryCode = "";
String sql = "";
......@@ -524,7 +524,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
return errString;
}
//System.out.println("rcpClubPost>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+rcpClubPost);
System.out.println("rcpClubPost>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+rcpClubPost);
itmDBAccessEJB = new ITMDBAccessEJB();
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME ))
......@@ -565,7 +565,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
java.text.SimpleDateFormat simpleDateFormat = new java.text.SimpleDateFormat(genericUtility.getDBDateFormat());
date = simpleDateFormat.parse(today.toString());
today = java.sql.Timestamp.valueOf(simpleDateFormat.format(date).toString() + " 00:00:00.0");
//System.out.println("Date : [ "+date+" ] today : [ "+today+" ] ");
System.out.println("Date : [ "+date+" ] today : [ "+today+" ] ");
//Ended by varsha v for truncating time from tran_date on 07-05-18
sql = "select tran_id, tran_date, cust_code, tran_type, rcp_mode, bank_code, ref_no, ref_date, remarks, net_amt, curr_code," +
" exch_rate, net_amt__bc, fin_entity, acct_code__ar, cctr_code__ar, acct_code__bal, cctr_code__bal, site_code," +
......@@ -617,8 +617,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
RcpHdrMap.put("cctr_code__adv",rs.getString("cctr_code__adv")==null?" ":rs.getString("cctr_code__adv"));
RcpHdrMap.put("tax_amt",rs.getDouble("tax_amt"));
RcpHdrMap.put("item_ser",rs.getString("item_ser"));
System.out.println(" Header Map..........");
//System.out.println(RcpHdrMap.toString());
System.out.println(" Header Map..........1"+RcpHdrMap);
System.out.println(RcpHdrMap.toString());
}
pstmt.close();
pstmt = null;
......@@ -691,7 +691,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
DetMap.put("eff_bank", rs.getString("eff_bank")); // 03/02/14 Manoj
DetList.add(DetMap);
System.out.println(" receipt Acct Map..........");
System.out.println("DetList initial [" + DetList.toString() + "]");
System.out.println("DetList initial2 [" + DetList.toString() + "]");
}
rs.close();
rs = null;
......@@ -761,7 +761,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
EpcAdjMap.put("sundry_type", rs.getString("sundry_type"));
EpcAdjMap.put("sundry_code", rs.getString("sundry_code"));
EpcAdjList.add(EpcAdjMap);
System.out.println(" Rcpepc Adj Map..........");
System.out.println(" Rcpepc Adj Map..........3"+EpcAdjList);
System.out.println(EpcAdjList.toString());
}
......@@ -792,7 +792,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
RcpDetMap.put("bill_disc_amt", rs.getDouble("bill_disc_amt")); //ADDED BY RITESH ON 24/05/13
RcpDetList.add(RcpDetMap);
System.out.println(" DetMap Map..........");
System.out.println(" DetMap Map........."+RcpDetList);
System.out.println(RcpDetMap.toString());
}
......@@ -816,7 +816,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//finTotal = finTotal + (double) Double.parseDouble( "" + RcpDetMap.get("fin_chg"));
tFin = tFin + (double) Double.parseDouble( "" + RcpDetMap.get("fin_chg"));
// System.out.println("LINE NO 541"+total);
System.out.println("LINE NO 541"+total);
if(rcpClubPost.equals("Y"))
{
......@@ -893,7 +893,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
{
findIndex = -1;
}
// System.out.println("findIndex>>>>>>>>>>>>>>>>>>>>>>>>>>>>773"+findIndex);
System.out.println("findIndex>>>>>>>>>>>>>>>>>>>>>>>>>>>>773"+findIndex);
if (findIndex > -1)
{
detMap = (HashMap) DetList.get(findIndex);
......@@ -901,7 +901,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detAmount = (double) Double.parseDouble( "" + RcpDetMap.get("rcp_amt"));
detMap.put("amount", amountMap + detAmount );
DetList.set(findIndex, detMap);
// System.out.println("amount>>>>>>>>>>>>>>>>>>>>>>>>>>>>781"+(amountMap + detAmount));
System.out.println("amount>>>>>>>>>>>>>>>>>>>>>>>>>>>>781"+(amountMap + detAmount));
}
else
......@@ -929,7 +929,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
// populate bill if bill is discounted
// then credit the amount to the BD
// System.out.println("DetList*****************************811******************"+DetList.toString());
System.out.println("DetList*****************************811******************"+DetList.toString());
total=0;
for(i=0 ; i<RcpDetList.size() ; i++)
{
......@@ -989,7 +989,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
total = total + rcpAmt;
//System.out.println("total in 666"+total);
System.out.println("total in 666"+total);
tFin = tFin + finChg;
......@@ -1103,7 +1103,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
}
// System.out.println("DetList*****************984******************************"+DetList.toString());
System.out.println("DetList*****************984******************************"+DetList.toString());
//adjust for advances adjusted
for(i=0 ; i<ADetList.size() ; i++)
......@@ -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);
......@@ -1221,7 +1221,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt = null;
}*/
}
// System.out.println("DetList****************************1102*******************"+DetList.toString());
System.out.println("DetList****************************1102*******************"+DetList.toString());
// insert data for finchg
//take but det and insert
......@@ -1229,7 +1229,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
if(tFin != 0)
{
total = total + tFin;
// System.out.println("LINE NO 812"+total);
System.out.println("LINE NO 812"+total);
acct = acctFin==null?"":acctFin;
......@@ -1351,16 +1351,16 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
//System.out.println("DetList**************************1231*********************"+DetList.toString());
System.out.println("DetList**************************1231*********************"+DetList.toString());
// insert data for advance
advAmt = (double) Double.parseDouble( "" + RcpHdrMap.get("adv_amt"));
//System.out.println("ADVAMT*********"+advAmt);
System.out.println("ADVAMT*********"+advAmt);
if(advAmt!= 0)
{
total = total + advAmt;
//System.out.println("LINE NO 874"+total);
// System.out.println("total in adv"+total);
System.out.println("LINE NO 874"+total);
System.out.println("total in adv"+total);
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");
exch = (double) Double.parseDouble( "" + RcpHdrMap.get("exch_rate"));
......@@ -1369,7 +1369,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
if(rcpClubPost.equals("Y"))
{
findIndex = findExistingIndex(DetList, acct, cctr, exch);
// System.out.println("FINDINDEX>>>>>>>1243>>>>>"+findIndex);
System.out.println("FINDINDEX>>>>>>>1243>>>>>"+findIndex);
}
else
{
......@@ -1388,7 +1388,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
rs=null;
pstmt.close();
pstmt=null;
// System.out.println("total in adv"+amtNoBankEffect);
System.out.println("total in adv"+amtNoBankEffect);
if (findIndex > -1)
{
detMap = (HashMap) DetList.get(findIndex);
......@@ -1398,7 +1398,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
else
{
// System.out.println("Into Else part of findIndex > -1>>>>");
System.out.println("Into Else part of findIndex > -1>>>>");
detMap = new HashMap();
/*sql="select sum(amount*exch_rate/?) from rcpacct where tran_id=? and eff_bank='N'";
pstmt=conn.prepareStatement(sql);
......@@ -1428,7 +1428,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("eff_bank", "Y"); // 03/02/14 Manoj
DetList.add(detMap);
}
//System.out.println("1273---DetList.toString()----"+DetList.toString());
System.out.println("1273---DetList.toString()----"+DetList.toString());
/*sql = "select count(*) from rcpacct where acct_code = ? and cctr_code = ? and exch_rate = ? and tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,acct);
......@@ -1526,7 +1526,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
totEpcBc = totEpcBc + (hexchRate * amount);
}
//added to by monika
// System.out.println("epccurrsame value:::"+isEpcCurrSame);
System.out.println("epccurrsame value:::"+isEpcCurrSame);
if(rcpClubPost.equals("Y"))
{
......@@ -1784,7 +1784,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
rs = null;
pstmt.close();
pstmt = null;
// System.out.println("badDebtAmt>>>>>>1642>>>>>>>"+badDebtAmt);
System.out.println("badDebtAmt>>>>>>1642>>>>>>>"+badDebtAmt);
if(badDebtAmt > 0)
{
sql = "select tran_id, acct_code__dr,cctr_code__dr, acct_code__cr, cctr_code__cr, amt_prov, case when amt_revrsed is null then 0 else amt_revrsed end from bad_debts_prov where tran_ser = ? and ref_no = ? and amt_prov <> 0 order by tran_date";
......@@ -1806,7 +1806,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
amtRev = Math.min(badDebtAmt,amtProv);
totBad = totBad + amtRev;
//System.out.println("LINE NO 1164"+total);
System.out.println("LINE NO 1164"+total);
if(rcpClubPost.equals("Y"))
{
......@@ -2015,8 +2015,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt = null;
totBad = 0;
}
// System.out.println("aaaaaaaaaaaa"+total);
//System.out.println("BBBBBBBBBBB"+total);
System.out.println("aaaaaaaaaaaa"+total);
System.out.println("BBBBBBBBBBB"+total);
System.out.println("CCCCCCCCCCCC"+total);
}
......@@ -2028,7 +2028,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
total = (double) Double.parseDouble( "" + RcpHdrMap.get("net_amt"));
totBc = (double) Double.parseDouble( "" + RcpHdrMap.get("net_amt__bc"));
//total = total-(double) Double.parseDouble( "" + RcpHdrMap.get("oth_amt"));--Mismatch Amount 21/03/17
//System.out.println("Final total ["+ total + "] totBc [" + totBc + "]");
System.out.println("Final total ["+ total + "] totBc [" + totBc + "]");
//total = 0;
......@@ -2036,20 +2036,20 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//totBc = totBc + (Double)RcpHdrMap.get("net_amt__bc")+(Double)RcpHdrMap.get("tax_amt"); //change done by akhilesh on 05/sep/2013 for adjust tax amount
//System.out.println("net_amt AND net_amt__bc 1"+total+""+totBc);
System.out.println("net_amt AND net_amt__bc 1 ["+total+"] tot bc["+totBc);
if(bdFluctuationCf.equalsIgnoreCase("N"))
{
totBc = totBc + totbdDiff;
//System.out.println("bdFluctuationCf [" + bdFluctuationCf + "] totBc ["+totBc + "]");
System.out.println("bdFluctuationCf [" + bdFluctuationCf + "] totBc ["+totBc + "]");
}
// if EPC is adjusted in diff currency then update the net amount bc.
if(isEpcCurrSame == true)
{
//System.out.println("total ["+total+"] totEpc ["+totEpc+"] totEpcBc ["+totEpcBc + "]");
System.out.println("total ["+total+"] totEpc ["+totEpc+"] totEpcBc ["+totEpcBc + "]");
total = total + totEpc;
totBc = totBc +totEpcBc;
}
......@@ -2085,22 +2085,22 @@ 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
if ((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")) != 0 && (double) Double.parseDouble( "" + RcpHdrMap.get("chq_amt")) != 0)
......@@ -2110,7 +2110,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
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)
{
......@@ -2123,7 +2123,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
{
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)
{
......@@ -2136,7 +2136,7 @@ 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 + "]");
// 14/01/14 manoharan details has to be inserted
sql = "select max(line_no) from rcpacct where tran_id = ?";
......@@ -2151,10 +2151,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
rs = null;
pstmt.close();
pstmt = null;
//System.out.println("Max Line>>>"+maxline);
System.out.println("Max Line>>>"+maxline);
if(!isPreview )
{
//System.out.println(" >>>>>>>>>>>>>"+isPreview);
System.out.println(" >>>>>>>>>>>>>"+isPreview);
sql = "Insert into rcpacct (TRAN_ID,LINE_NO,ACCT_CODE,CCTR_CODE,EXCH_RATE,AMOUNT,EMP_CODE,ANAL_CODE,EFFECT_PARTY,SUNDRY_TYPE,SUNDRY_CODE) values (?,?,?,?,?,?,?,?,?,?,?)";
pstmt = conn.prepareStatement(sql);
for(i = detListSize ; i<DetList.size() ; i++)
......@@ -2356,7 +2356,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
private String gbfPostReceipt(String tranId,String xtraParams,HashMap RcpHdrMap,ArrayList DDetList, ArrayList RcpDetList,ArrayList ADetList,ArrayList EpcAdjList,double amtNoBankEffect, Connection conn,boolean isPreview)throws RemoteException,ITMException
{
//System.out.println("gbfPostReceipt Called..........");
System.out.println("gbfPostReceipt Called..........");
String errString = "";
String ledgPostConf = "";
String sql = "";
......@@ -2456,7 +2456,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
rs = null;
pstmt.close();
pstmt = null;
//System.out.println("Max Line:--"+maxline);
System.out.println("Max Line:--"+maxline);
sql = "Insert into rcpacct (TRAN_ID,LINE_NO,ACCT_CODE,CCTR_CODE,AMOUNT,EXCH_RATE,EFFECT_PARTY,AMOUNT__BC,EFF_BANK,CURR_CODE) values (?,?,?,?,?,?,?,?,?,?)";
pstmt1 = conn.prepareStatement(sql);
......@@ -2500,8 +2500,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt1=null;
pstmt.close();
pstmt=null;
//System.out.println("netAmountBc+taxAmt amount --------->"+netAmount);
// System.out.println("netAmountBc+taxAmt amount --------->"+amount);
System.out.println("netAmountBc+taxAmt amount --------->"+netAmount);
System.out.println("netAmountBc+taxAmt amount --------->"+amount);
//end
if(! isPreview)//if isPreview is false
......@@ -2522,7 +2522,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
if(amount > 0)
{
//System.out.println("advbking amount=["+amount+"]");
System.out.println("advbking amount=["+amount+"]");
// sql = "update advbking set bal_amt=bal_amt - ? where tran_id=?";
sql = "update advbking set bal_amt = (case when bal_amt is null then 0 else bal_amt end -?) where tran_id = ?";
/*pstmt = conn.prepareStatement(sql);
......@@ -2543,7 +2543,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt1.close();
pstmt1 = null;
// System.out.println("balamount in advbking=[");
System.out.println("balamount in advbking=[");
}
}
rs.close();
......@@ -2637,7 +2637,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
private String gbfPostRcphdr(String tranId,String xtraParams,HashMap RcpHdrMap,ArrayList RcpDetList,double amtNoBankEffect,Connection conn,boolean isPreview)throws RemoteException,ITMException
{
//System.out.println("gbfPostRcphdr called........");
System.out.println("gbfPostRcphdr called........");
String errString = "";
String currCode = "";
String siteCode = "";
......@@ -2727,7 +2727,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
errString = itmDBAccessEJB.getErrorString("","VTFINPARM","","",conn);
}
//System.out.println("net_amt AND net_amt__bc 1"+RcpHdrMap.get("net_amt")+""+RcpHdrMap.get("net_amt__bc"));
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"))
......@@ -2833,7 +2833,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
currCode = (String)RcpHdrMap.get("curr_code");
exchRate = (double) Double.parseDouble( "" + RcpHdrMap.get("exch_rate"));
//System.out.println("exchange_rate in diff hdr"+exchRate);
System.out.println("exchange_rate in diff hdr"+exchRate);
projCode = (String)RcpHdrMap.get("proj_code");
projCode = (String)RcpHdrMap.get("proj_code");
refNO = (String)RcpHdrMap.get("ref_no");
......@@ -2864,7 +2864,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt.close();
pstmt=null;
//System.out.println("netAmountBc+taxAmt amount --------->"+netAmountBc);
System.out.println("netAmountBc+taxAmt amount --------->"+netAmountBc);
//ended by akhilesh on 31/july/13 for tax provision
......@@ -2893,16 +2893,17 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
glTraceMap.put("anal_code", "");
//System.out.println("AMOUTTTTTTTTTTTTTTT"+(Double)RcpHdrMap.get("net_amt")+""+netAmountBc);
System.out.println("AMOUTTTTTTTTTTTTTTT"+(Double)RcpHdrMap.get("net_amt")+""+netAmountBc);
if(isInBaseCurr == true)
{
//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("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 )
System.out.println("NET AMOUNT BC..["+RcpHdrMap.get("net_amt__bc"));
//if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt__bc")) < 0 )
if(netAmountBc<0)
{
glTraceMap.put("dr_amt", 0.0);
glTraceMap.put("cr_amt", -1 * netAmountBc);
......@@ -2915,15 +2916,16 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
else
{
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//commented by monika 20 nov 19
//System.out.println("IN FALSE!!!!!!!!!!!!!!!!!");
System.out.println("IN FALSE!!!!!!!!!!!!!!!!!");
glTraceMap.put("curr_code", currCode);
glTraceMap.put("exch_rate", exchRate);
// System.out.println("NET AMOUNT BC..["+RcpHdrMap.get("net_amt"));
if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")) < 0 )
System.out.println("NET AMOUNT BC..["+RcpHdrMap.get("net_amt"));
// if((double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")) < 0 )
if(netAmt<0)
{
glTraceMap.put("dr_amt", 0.0);
glTraceMap.put("cr_amt", -1 * netAmt);
......@@ -2946,7 +2948,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//ls_errcode = gbf_gltrace_upd(lstr_gltrace)
//System.out.println("1766 glTraceUpdate Called........isPreview value......"+isPreview);
//System.out.println("the vslue for CR AMT**********************"+glTraceMap.get("cr_amt"));
System.out.println("the vslue for CR AMT**********************"+glTraceMap.get("cr_amt"));
errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
//System.out.println("ERROR STRING>>>>>>>>>>>>>>>>>>>>>>"+errString);
if(errString != null && errString.trim().length() > 0)
......@@ -3007,7 +3009,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//Added by Sharon as instructed by Shiri madam on 29-July-2004
if (chqAmt != 0 || advAmt > 0 )
{
// System.out.println("In 1826 SUNDRY-BAL !!!!!!!!!!!!!!!!!!!!!!!!!!");
System.out.println("In 1826 SUNDRY-BAL !!!!!!!!!!!!!!!!!!!!!!!!!!");
if (! isPreview)//if isPreview is false *****vishakha
{
errString = finCommon.gbf_sundrybal_upd(sundryBalMap,conn);
......@@ -3071,7 +3073,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//bankTranLogMap.put("exch_rate", exchRate);
bankTranLogMap.put("entry_batch_no",(String)RcpHdrMap.get("entry_batch_no") );
//ls_errcode = gbf_banktranlog_upd(lstr_banktranlog)
// System.out.println("545 bankTranLogUpdateeUpdate Called..............");
System.out.println("545 bankTranLogUpdateeUpdate Called..............");
errString = finCommon.bankTranLogUpdate(bankTranLogMap, xtraParams, conn);
if(errString != null && errString.trim().length() > 0)
{
......@@ -3109,13 +3111,13 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
glTraceMap.put("exch_rate", 1.0);
if((double) Double.parseDouble( "" + RcpHdrMap.get("diff_amt__exch")) > 0)
{
// System.out.println("inside true-- difference amount in gltrace"+ RcpHdrMap.get("diff_amt__exch"));
System.out.println("inside true-- difference amount in gltrace"+ RcpHdrMap.get("diff_amt__exch"));
glTraceMap.put("dr_amt",(double) Double.parseDouble( "" + RcpHdrMap.get("diff_amt__exch")));
glTraceMap.put("cr_amt", 0);
cnt1=1;
}else
{
// System.out.println("inside false--- difference amount in gltrace"+ RcpHdrMap.get("diff_amt__exch"));
System.out.println("inside false--- difference amount in gltrace"+ RcpHdrMap.get("diff_amt__exch"));
glTraceMap.put("dr_amt", 0.0);
glTraceMap.put("cr_amt", -1 * (double) Double.parseDouble( "" + RcpHdrMap.get("diff_amt__exch")));
......@@ -3133,7 +3135,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
glTraceMap.put("chg_term", chgTermstr);
//ls_errcode = gbf_gltrace_upd(lstr_gltrace)
//System.out.println("1938 glTraceUpdate Called..............");
System.out.println("1938 glTraceUpdate Called..............");
errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
//errString=finCommon.gl
if(errString != null && errString.trim().length() > 0)
......@@ -3144,11 +3146,11 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
}
//System.out.println("exchange rate---in difference amount---"+glTraceMap.get("exch_rate"));
System.out.println("exchange rate---in difference amount---"+glTraceMap.get("exch_rate"));
debit = debit + ((double) Double.parseDouble( "" + glTraceMap.get("dr_amt")) * (double) Double.parseDouble( "" + glTraceMap.get("exch_rate")));
credit = credit + ((double) Double.parseDouble( "" + glTraceMap.get("cr_amt")) * (double) Double.parseDouble( "" + glTraceMap.get("exch_rate")));
//System.out.println("credit difference>>["+credit+"] debit >>>["+debit+"]");
System.out.println("credit difference>>["+credit+"] debit >>>["+debit+"]");
// insert into receivables for advance amount
......@@ -3203,7 +3205,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
receivablesMap.put("cust_ref_date",null);
receivablesMap.put("cust_ref_amt","");
// System.out.println("In 1997 receivablesMap [" + receivablesMap + "]");
System.out.println("In 1997 receivablesMap [" + receivablesMap + "]");
errString = finCommon.gbfReceivablesUpd(receivablesMap,conn);
if(errString != null && errString.trim().length() > 0)
{
......@@ -3227,7 +3229,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
sundryBalMap.put("adv_amt", ((double) Double.parseDouble( "" + RcpHdrMap.get("adv_amt"))));
contactCode = finCommon.getContactCode(sundryType, sundryCode, conn);
sundryBalMap.put("contact_code",contactCode );
// System.out.println("In 2021 sundryBalMap [" + sundryBalMap + "]");
System.out.println("In 2021 sundryBalMap [" + sundryBalMap + "]");
errString = finCommon.gbf_sundrybal_upd(sundryBalMap,conn);
if(errString != null && errString.trim().length() > 0)
......@@ -3365,7 +3367,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
private String gbfPostRcpdet(String tranId,String xtraParams,HashMap RcpHdrMap,ArrayList DetList, ArrayList RcpDetList ,ArrayList ADetList,ArrayList EpcAdjList,Connection conn,boolean isPreview)throws RemoteException,ITMException
{
//System.out.println("gbfPostRcpdet called.............."+RcpDetList);
System.out.println("gbfPostRcpdet called.............."+RcpDetList);
String errString = "";
String currCode = "";
String siteCode = "";
......@@ -3470,11 +3472,11 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
for (int ctr =0; ctr < DetList.size(); ctr++)
{
// System.out.println("no of times "+ctr);
System.out.println("no of times "+ctr);
//DetMap = new HashMap();
DetMap = (HashMap) DetList.get(ctr);
// System.out.println(" DetMap ctr [" + ctr + "] ["+DetMap + "]");
System.out.println(" DetMap ctr [" + ctr + "] ["+DetMap + "]");
/* sundryType = (String)detListMap.get("sundry_type");
sundryCode = (String)detListMap.get("sundry_code");
......@@ -3501,7 +3503,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
glTraceMap.put("sundry_type",(String)DetMap.get("sundry_type")==null?"O":(String)DetMap.get("sundry_type"));
glTraceMap.put("sundry_code",(String)DetMap.get("sundry_code")== null?"":(String)DetMap.get("sundry_code"));
glTraceMap.put("acct_code", (String)DetMap.get("acct_code"));
// System.out.println("818 account chek ="+acctCode+" "+sundryType+" "+sundryCode);
System.out.println("818 account chek ="+acctCode+" "+sundryType+" "+sundryCode);
glTraceMap.put("cctr_code", (String)DetMap.get("cctr_code")==null?" ":(String)DetMap.get("cctr_code"));
glTraceMap.put("emp_code", (String)DetMap.get("emp_code"));
glTraceMap.put("anal_code", (String)DetMap.get("anal_code"));
......@@ -3509,7 +3511,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
glTraceMap.put("proj_code", projectCode);
glTraceMap.put("exch_rate", (double) Double.parseDouble( "" + DetMap.get("exch_rate")));
// System.out.println("818 exchrate ="+acctCode+" "+sundryType+" "+sundryCode+" exchrate sundry bal"+DetMap.get("exch_rate"));
System.out.println("818 exchrate ="+acctCode+" "+sundryType+" "+sundryCode+" exchrate sundry bal"+DetMap.get("exch_rate"));
amount = (double) Double.parseDouble( "" + DetMap.get("amount"));
if(amount > 0)
......@@ -3530,23 +3532,23 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
glTraceMap.put("chg_date", new Timestamp(tranDate.getTime()));
glTraceMap.put("chg_user", loginEmpCode);
glTraceMap.put("chg_term", chgTermstr);
// System.out.println("848 glTraceUpdate Called..ctr [" + ctr + "] glTraceMap [" + glTraceMap + "]");
System.out.println("848 glTraceUpdate Called..ctr [" + ctr + "] glTraceMap [" + glTraceMap + "]");
errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
if(errString != null && errString.trim().length() > 0)
{
// System.out.println("ERROR IN GLTRACE ........... errString [" + errString + "]");
System.out.println("ERROR IN GLTRACE ........... errString [" + errString + "]");
return errString;
}
debit = debit + ((double) Double.parseDouble( "" + glTraceMap.get("dr_amt")) * (double) Double.parseDouble( "" + glTraceMap.get("exch_rate")));
credit = credit + ((double) Double.parseDouble( "" + glTraceMap.get("cr_amt")) * (double) Double.parseDouble( "" + glTraceMap.get("exch_rate")));
// System.out.println("dr in receivables "+debit+" credit "+credit);
System.out.println("dr in receivables "+debit+" credit "+credit);
/// update sundrybal for customer code
if((String)glTraceMap.get("sundry_type") != null && !((String)glTraceMap.get("sundry_type")).trim().equalsIgnoreCase("O") && (! isPreview))//if is Preview is false **vishakha
{
//System.out.println("COMES INTO CONDITION ...........");
System.out.println("COMES INTO CONDITION ...........");
sundryBalMap = new HashMap();
......@@ -3572,26 +3574,26 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
sundryBalMap.put("dr_amt", -1 * amount);
sundryBalMap.put("cr_amt", 0.0);
}
// System.out.println("dr in sundry "+amount);
System.out.println("dr in sundry "+amount);
sundryBalMap.put("adv_amt", 0.0);
contactCode = finCommon.getContactCode(sundryType, sundryCode, conn);
sundryBalMap.put("contact_code",contactCode );
//System.out.println("2366 sundryBaleUpdate Called..............");
System.out.println("2366 sundryBaleUpdate Called..............");
errString = finCommon.gbf_sundrybal_upd(sundryBalMap, conn);
if(errString != null && errString.trim().length() > 0)
{
// System.out.println("error is sundryBaleUpdate ..........."+errString);
System.out.println("error is sundryBaleUpdate ..........."+errString);
return errString;
}
}
//System.out.println("last ...........3316");
System.out.println("last ...........3316");
}
//System.out.println("@V@ isPreview :- ["+isPreview+"]");
System.out.println("@V@ isPreview :- ["+isPreview+"]");
if(! isPreview) // if isPreview is false ****vishakha
{
for (int ctr =0; ctr < RcpDetList.size(); ctr++)
......@@ -3638,8 +3640,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
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) + "]");
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+"]");
......@@ -3741,9 +3743,9 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt.close();
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) + "]");
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) + "]");
double tempAmt=distCommon.getRequiredDecimal(Math.abs(amount - adjAmt), 3);
//System.out.println("@V@ TempAmt :- ["+tempAmt+"]");
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))
......@@ -3785,7 +3787,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
sundryBalMap.put("acct_code", (String)ADetMap.get("acct_code"));
sundryBalMap.put("cctr_code", (String)ADetMap.get("cctr_code"));
sundryBalMap.put("curr_code", hcurrCode);
//System.out.println("884 sundryBaleUpdate Called.............."+ ADetMap.get("exch_rate__vouch"));
System.out.println("884 sundryBaleUpdate Called.............."+ ADetMap.get("exch_rate__vouch"));
sundryBalMap.put("exch_rate", (double) Double.parseDouble( "" + ADetMap.get("exch_rate__vouch")));
sundryBalMap.put("dr_amt", 0.0);
sundryBalMap.put("cr_amt", 0.0);
......@@ -3851,9 +3853,9 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt.close();
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) + "]");
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) + "]");
double tempAmt=distCommon.getRequiredDecimal(Math.abs(amount - adjAmt), 3);
//System.out.println("@V@ TempAmt :- ["+tempAmt+"]");
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))
......@@ -3929,7 +3931,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
//added by akhilesh on 31/july/13 for tax provision
private String taxPost(String tranId,String xtraParams,HashMap RcpHdrMap,Connection conn)throws RemoteException,ITMException
{
//System.out.println("taxPost called.............."+RcpHdrMap);
System.out.println("taxPost called.............."+RcpHdrMap);
String 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