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();
// populate bill if bill is discounted
// then credit the amount to the BD
System.out.println("DetList*****************************811******************"+DetList.toString());
total=0;
for(i=0 ; i<RcpDetList.size() ; i++)
{
//RcpDetMap = new HashMap();
......@@ -1279,7 +1280,19 @@ conn = getConnection();
{
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)
{
detMap = (HashMap) DetList.get(findIndex);
......@@ -1291,7 +1304,7 @@ conn = getConnection();
{
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'";
/*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);
......@@ -1303,7 +1316,7 @@ conn = getConnection();
rs.close();
rs=null;
pstmt.close();
pstmt=null;
pstmt=null;*/
detMap.put("sundry_type", "C");
detMap.put("sundry_code", (String) RcpHdrMap.get("cust_code"));
detMap.put("acct_code", acct);
......@@ -1914,6 +1927,7 @@ if(!isPreview){
//totBc = total * exchRate;
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"));
System.out.println("Final total ["+ total + "] totBc [" + totBc + "]");
//total = 0;
......@@ -2407,11 +2421,13 @@ if(! isPreview)//if isPreview is false
ValidatorEJB validatorEJB = new ValidatorEJB();
// GenericUtility genericUtility = new GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = null;
String chgTermstr="";
try
{
finCommon =new FinCommon();
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());
itmDBAccessEJB = new ITMDBAccessEJB();
bdFluctuationCf = finCommon.getFinparams("999999", "BD_FLUCTUATION_CF", conn);
......@@ -2627,6 +2643,11 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("ref_id", tranId);
glTraceMap.put("remarks", remarks);
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)
System.out.println("1766 glTraceUpdate Called........isPreview value......"+isPreview);
System.out.println("the vslue for CR AMT**********************"+glTraceMap.get("cr_amt"));
......@@ -2807,6 +2828,11 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("ref_id", tranId);
glTraceMap.put("remarks", remarks);
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)
System.out.println("1938 glTraceUpdate Called..............");
errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
......@@ -3119,13 +3145,14 @@ if(! isPreview)//if isPreview is false
// GenericUtility genericUtility = new GenericUtility();
double nobankEffectAmt=0;
double exchRateHdr=0;
String chgTermstr="";
try
{
finCommon = new FinCommon();
distCommon = new DistCommon();
itmDBAccessEJB = new ITMDBAccessEJB();
loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTermstr= validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "chgTerm");
tranDate = (Date)RcpHdrMap.get("tran_date");
effDate = (Date)RcpHdrMap.get("eff_date");
finEntity = (String)RcpHdrMap.get("fin_entity");
......@@ -3197,6 +3224,9 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("ref_id", tranId);
glTraceMap.put("remarks",remarks);
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 + "]");
errString = finCommon.glTraceUpdate(glTraceMap,conn,isPreview);
if(errString != null && errString.trim().length() > 0)
......@@ -3571,6 +3601,7 @@ if(! isPreview)//if isPreview is false
DistCommon distCommon = null;
ITMDBAccessEJB itmDBAccessEJB = null;
ValidatorEJB validatorEJB = new ValidatorEJB();
String chgTermstr="";
// GenericUtility genericUtility = new GenericUtility();
boolean isPreview = false;
try
......@@ -3579,6 +3610,7 @@ if(! isPreview)//if isPreview is false
distCommon = new DistCommon();
itmDBAccessEJB = new ITMDBAccessEJB();
loginEmpCode = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTermstr= validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "chgTerm");
tranDate = (Date)RcpHdrMap.get("tran_date");
......@@ -3638,7 +3670,9 @@ if(! isPreview)//if isPreview is false
glTraceMap.put("analysis3",anal3);
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);
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