Commit f294c35c authored by msharma's avatar msharma

Eff_bank considered while receipt confirmation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103034 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 52a70ac5
...@@ -835,6 +835,7 @@ conn = getConnection(); ...@@ -835,6 +835,7 @@ conn = getConnection();
// populate bill if bill is discounted // populate bill if bill is discounted
// then credit the amount to the BD // 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++) for(i=0 ; i<RcpDetList.size() ; i++)
{ {
//RcpDetMap = new HashMap(); //RcpDetMap = new HashMap();
...@@ -1279,7 +1280,19 @@ conn = getConnection(); ...@@ -1279,7 +1280,19 @@ conn = getConnection();
{ {
findIndex = -1; findIndex = -1;
} }
sql="select sum(amount*exch_rate/?) from rcpacct where tran_id=? and eff_bank='N'";
pstmt=conn.prepareStatement(sql);
pstmt.setDouble(1, exch);
pstmt.setString(2, tranId);
rs=pstmt.executeQuery();
if(rs.next())
{
amtNoBankEffect=rs.getDouble(1);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
if (findIndex > -1) if (findIndex > -1)
{ {
detMap = (HashMap) DetList.get(findIndex); detMap = (HashMap) DetList.get(findIndex);
...@@ -1291,7 +1304,7 @@ conn = getConnection(); ...@@ -1291,7 +1304,7 @@ conn = getConnection();
{ {
System.out.println("Into Else part of findIndex > -1>>>>"); System.out.println("Into Else part of findIndex > -1>>>>");
detMap = new HashMap(); detMap = new HashMap();
sql="select sum(amount*exch_rate/?) from rcpacct where tran_id=? and eff_bank='N'"; /*sql="select sum(amount*exch_rate/?) from rcpacct where tran_id=? and eff_bank='N'";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setDouble(1, exch); pstmt.setDouble(1, exch);
pstmt.setString(2, tranId); pstmt.setString(2, tranId);
...@@ -1303,7 +1316,7 @@ conn = getConnection(); ...@@ -1303,7 +1316,7 @@ conn = getConnection();
rs.close(); rs.close();
rs=null; rs=null;
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;*/
detMap.put("sundry_type", "C"); detMap.put("sundry_type", "C");
detMap.put("sundry_code", (String) RcpHdrMap.get("cust_code")); detMap.put("sundry_code", (String) RcpHdrMap.get("cust_code"));
detMap.put("acct_code", acct); detMap.put("acct_code", acct);
...@@ -1914,6 +1927,7 @@ if(!isPreview){ ...@@ -1914,6 +1927,7 @@ if(!isPreview){
//totBc = total * exchRate; //totBc = total * exchRate;
total = (double) Double.parseDouble( "" + RcpHdrMap.get("net_amt")); total = (double) Double.parseDouble( "" + RcpHdrMap.get("net_amt"));
totBc = (double) Double.parseDouble( "" + RcpHdrMap.get("net_amt__bc")); totBc = (double) Double.parseDouble( "" + RcpHdrMap.get("net_amt__bc"));
total = total-(double) Double.parseDouble( "" + RcpHdrMap.get("oth_amt"));
System.out.println("Final total ["+ total + "] totBc [" + totBc + "]"); System.out.println("Final total ["+ total + "] totBc [" + totBc + "]");
//total = 0; //total = 0;
...@@ -2407,11 +2421,13 @@ if(! isPreview)//if isPreview is false ...@@ -2407,11 +2421,13 @@ if(! isPreview)//if isPreview is false
ValidatorEJB validatorEJB = new ValidatorEJB(); ValidatorEJB validatorEJB = new ValidatorEJB();
// GenericUtility genericUtility = new GenericUtility(); // GenericUtility genericUtility = new GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = null; ITMDBAccessEJB itmDBAccessEJB = null;
String chgTermstr="";
try try
{ {
finCommon =new FinCommon(); finCommon =new FinCommon();
loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode"); loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
chgTermstr= validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "chgTerm");
java.util.Date today= new java.sql.Date(new java.util.Date().getTime()); java.util.Date today= new java.sql.Date(new java.util.Date().getTime());
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessEJB = new ITMDBAccessEJB();
bdFluctuationCf = finCommon.getFinparams("999999", "BD_FLUCTUATION_CF", conn); bdFluctuationCf = finCommon.getFinparams("999999", "BD_FLUCTUATION_CF", conn);
...@@ -2627,6 +2643,11 @@ if(! isPreview)//if isPreview is false ...@@ -2627,6 +2643,11 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("ref_id", tranId); glTraceMap.put("ref_id", tranId);
glTraceMap.put("remarks", remarks); glTraceMap.put("remarks", remarks);
glTraceMap.put("proj_code", projectCode); glTraceMap.put("proj_code", projectCode);
glTraceMap.put("chg_date", new Timestamp(tranDate.getTime()));
glTraceMap.put("chg_user", loginEmpCode);
glTraceMap.put("chg_term", chgTermstr);
//ls_errcode = gbf_gltrace_upd(lstr_gltrace) //ls_errcode = gbf_gltrace_upd(lstr_gltrace)
System.out.println("1766 glTraceUpdate Called........isPreview value......"+isPreview); 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"));
...@@ -2807,6 +2828,11 @@ if(! isPreview)//if isPreview is false ...@@ -2807,6 +2828,11 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("ref_id", tranId); glTraceMap.put("ref_id", tranId);
glTraceMap.put("remarks", remarks); glTraceMap.put("remarks", remarks);
glTraceMap.put("proj_code", projectCode); glTraceMap.put("proj_code", projectCode);
glTraceMap.put("chg_date", new Timestamp(tranDate.getTime()));
glTraceMap.put("chg_user", loginEmpCode);
glTraceMap.put("chg_term", chgTermstr);
//ls_errcode = gbf_gltrace_upd(lstr_gltrace) //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.glTraceUpdate(glTraceMap,conn,isPreview);
...@@ -3119,13 +3145,14 @@ if(! isPreview)//if isPreview is false ...@@ -3119,13 +3145,14 @@ if(! isPreview)//if isPreview is false
// GenericUtility genericUtility = new GenericUtility(); // GenericUtility genericUtility = new GenericUtility();
double nobankEffectAmt=0; double nobankEffectAmt=0;
double exchRateHdr=0; double exchRateHdr=0;
String chgTermstr="";
try try
{ {
finCommon = new FinCommon(); finCommon = new FinCommon();
distCommon = new DistCommon(); distCommon = new DistCommon();
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessEJB = new ITMDBAccessEJB();
loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTermstr= validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "chgTerm");
tranDate = (Date)RcpHdrMap.get("tran_date"); tranDate = (Date)RcpHdrMap.get("tran_date");
effDate = (Date)RcpHdrMap.get("eff_date"); effDate = (Date)RcpHdrMap.get("eff_date");
finEntity = (String)RcpHdrMap.get("fin_entity"); finEntity = (String)RcpHdrMap.get("fin_entity");
...@@ -3197,6 +3224,9 @@ if(! isPreview)//if isPreview is false ...@@ -3197,6 +3224,9 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("ref_id", tranId); glTraceMap.put("ref_id", tranId);
glTraceMap.put("remarks",remarks); glTraceMap.put("remarks",remarks);
glTraceMap.put("party_doc_ref",partyDocRef); glTraceMap.put("party_doc_ref",partyDocRef);
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); errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
if(errString != null && errString.trim().length() > 0) if(errString != null && errString.trim().length() > 0)
...@@ -3571,6 +3601,7 @@ if(! isPreview)//if isPreview is false ...@@ -3571,6 +3601,7 @@ if(! isPreview)//if isPreview is false
DistCommon distCommon = null; DistCommon distCommon = null;
ITMDBAccessEJB itmDBAccessEJB = null; ITMDBAccessEJB itmDBAccessEJB = null;
ValidatorEJB validatorEJB = new ValidatorEJB(); ValidatorEJB validatorEJB = new ValidatorEJB();
String chgTermstr="";
// GenericUtility genericUtility = new GenericUtility(); // GenericUtility genericUtility = new GenericUtility();
boolean isPreview = false; boolean isPreview = false;
try try
...@@ -3579,6 +3610,7 @@ if(! isPreview)//if isPreview is false ...@@ -3579,6 +3610,7 @@ if(! isPreview)//if isPreview is false
distCommon = new DistCommon(); distCommon = new DistCommon();
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessEJB = new ITMDBAccessEJB();
loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTermstr= validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "chgTerm");
tranDate = (Date)RcpHdrMap.get("tran_date"); tranDate = (Date)RcpHdrMap.get("tran_date");
...@@ -3638,7 +3670,9 @@ if(! isPreview)//if isPreview is false ...@@ -3638,7 +3670,9 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("analysis3",anal3); glTraceMap.put("analysis3",anal3);
System.out.println("glTraceUpdate before update "+glTraceMap); System.out.println("glTraceUpdate before update "+glTraceMap);
glTraceMap.put("chg_date", new Timestamp(tranDate.getTime()));
glTraceMap.put("chg_user", loginEmpCode);
glTraceMap.put("chg_term", chgTermstr);
errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview); errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
System.out.println("glTraceUpdate errString "+errString); System.out.println("glTraceUpdate errString "+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