Commit 9f6d4526 authored by mjadhav's avatar mjadhav

add currency_code and exch_rate field


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97926 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 51cc9602
......@@ -36,7 +36,7 @@ public class GenReceiptIC extends ValidatorEJB implements GenReceiptICLocal, Gen
*/
GenericUtility genericUtility = GenericUtility.getInstance();
String winName = null;
FinCommon finCommon = null;
FinCommon finCommon = new FinCommon();
ValidatorEJB validator = null;
String allXmlDataStr1="";
......@@ -486,14 +486,14 @@ public class GenReceiptIC extends ValidatorEJB implements GenReceiptICLocal, Gen
errFields.add(childNodeName.toLowerCase());
}
if(checkAmtvalidation(dom1))
//removed validation for total receipt amount less than cheque amount.
/*if(checkAmtvalidation(dom1))
{
errCode = "VTCHQATINV";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}*/
System.out.println("ref_ser :"+genericUtility.getColumnValue("ref_ser",domAll));
System.out.println("ref_no :"+genericUtility.getColumnValue("ref_no",domAll));
......@@ -772,20 +772,31 @@ public class GenReceiptIC extends ValidatorEJB implements GenReceiptICLocal, Gen
pstmt.close();
pstmt = null;
double exchangeRate= 0.0;
String currencyCode="";
sql = " select bank_name from bank where bank_code=? ";
sql = " select bank_name,curr_code from bank where bank_code=? ";
pstmt = connObject.prepareStatement(sql);
pstmt.setString(1, bankCode);
rSet = pstmt.executeQuery();
if( rSet.next() )
{
bankName = rSet.getString("bank_name");
currencyCode = rSet.getString("curr_code");
}
rSet.close(); // added By akhilesh on 10/01/13 to close the statement
rSet = null;
pstmt.close();
pstmt = null;
System.out.println("bankName :"+bankName);
System.out.println("currencyCode :"+currencyCode);
System.out.println("currDate :"+currDate);
System.out.println("loginSite !!:"+loginSite);
exchangeRate = finCommon.getDailyExchRateSellBuy(currencyCode,"",loginSite, checkNull( currDate ), "S", connObject);
System.out.println("exchangeRate :"+exchangeRate);
valueXmlString.append("<tran_date><![CDATA[" ).append( checkNull( currDate ) ).append( "]]></tran_date>\r\n" );
valueXmlString.append("<tran_type protect = \"0\"><![CDATA[" ).append("L").append( "]]></tran_type>\r\n");
valueXmlString.append("<eff_date><![CDATA[" ).append( checkNull( currDate ) ).append( "]]></eff_date>\r\n" );
......@@ -796,8 +807,11 @@ public class GenReceiptIC extends ValidatorEJB implements GenReceiptICLocal, Gen
valueXmlString.append("<bank_code><![CDATA[" ).append(bankCode).append( "]]></bank_code>\r\n");
valueXmlString.append("<bank_name><![CDATA[" ).append(bankName).append( "]]></bank_name>\r\n");
valueXmlString.append("<verify_flag><![CDATA[" ).append("N").append( "]]></verify_flag>\r\n");
valueXmlString.append("<curr_code>").append("<![CDATA["+currencyCode+"]]>").append("</curr_code>\r\n");
valueXmlString.append("<exch_rate>").append("<![CDATA["+exchangeRate+"]]>").append("</exch_rate>\r\n");
System.out.println("Itm default Rohan" + valueXmlString.toString());
System.out.println("Itm default " + valueXmlString.toString());
}
else if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
......
......@@ -235,7 +235,7 @@ public class GenReceiptConf extends ActionHandlerEJB implements GenReceiptConfLo
ITMDBAccessEJB itmDBAccessEJB = null;
String errString ="",xmlString="",sql="",acctCode="",remarks="",finEntity="";
String lineNoRef="",refNo="",refSer="";
String custCode="",tranType="",rcpMode="",bankCode="",custbankRef="",currCode="",currCodeHD="";
String custCode="",tranType="",rcpMode="",bankCode="",custbankRef="",currCode="",currCodeHD="",currencyCodeHD="";
String acctCodeArHD="",cctrCodeArHD="",acctCodeAdvHD="",cctrCodeAdvHD="";
String acctCodeBalHD="",cctrCodeBalHD="",acctCodeCfHD="",cctrCodeCfHD="",acctCodeCfArHD="",cctrCodeCfArHD="",chgTerm="",chgUser="",loginEmpCode="";
StringBuffer xmlBuff = new StringBuffer();
......@@ -252,7 +252,7 @@ public class GenReceiptConf extends ActionHandlerEJB implements GenReceiptConfLo
Date refDate=null,effDate=null,chgDate=null;
double rcpAmt =0.0,chqAmt=0.0,totRcpAmt=0.0,adjAmt=0.0,chqAmtNew=0.0;
double rcpAmt =0.0,chqAmt=0.0,totRcpAmt=0.0,adjAmt=0.0,chqAmtNew=0.0,exchRate=0.0,exchRateHD=0.0;
itmDBAccessEJB = new ITMDBAccessEJB();
SimpleDateFormat sdf = new SimpleDateFormat(e12GenericUtility.getApplDateFormat());
......@@ -273,7 +273,7 @@ public class GenReceiptConf extends ActionHandlerEJB implements GenReceiptConfLo
sql = "select CUST_CODE,TRAN_TYPE,RCP_MODE,BANK_CODE ,REF_NO,REF_DATE,SITE_CODE, " +
" EFF_DATE,CUST_BANK_REF,CHQ_AMT,REMARKS from RECEIPT_FORM where tran_id = ? ";
" EFF_DATE,CUST_BANK_REF,CHQ_AMT,REMARKS,curr_code,exch_rate from RECEIPT_FORM where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -292,6 +292,8 @@ public class GenReceiptConf extends ActionHandlerEJB implements GenReceiptConfLo
custbankRef=rs.getString("CUST_BANK_REF");
chqAmt=rs.getDouble("CHQ_AMT");
remarks=rs.getString("REMARKS");
currencyCodeHD=rs.getString("curr_code");
exchRateHD=rs.getDouble("exch_rate");
}
......@@ -314,6 +316,7 @@ public class GenReceiptConf extends ActionHandlerEJB implements GenReceiptConfLo
remarks = remarks == null ? "" : remarks.trim();
chgUser = chgUser == null ? "" : chgUser.trim();
chgTerm = chgTerm == null ? "" : chgTerm.trim();
currencyCodeHD = currencyCodeHD == null ? "" : currencyCodeHD.trim();
if(remarks == "")
{
......@@ -491,6 +494,8 @@ public class GenReceiptConf extends ActionHandlerEJB implements GenReceiptConfLo
xmlBuff.append("<chg_user><![CDATA["+chgUser+"]]></chg_user>");
xmlBuff.append("<chg_term><![CDATA["+chgTerm+"]]></chg_term>");
xmlBuff.append("<chg_date><![CDATA["+tranDate+"]]></chg_date>");
xmlBuff.append("<curr_code><![CDATA["+currencyCodeHD+"]]></curr_code>");
xmlBuff.append("<exch_rate><![CDATA["+exchRateHD+"]]></exch_rate>");
xmlBuff.append("</Detail1>");
......
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