Commit 713bf888 authored by msharma's avatar msharma

Set Bank code in receipt from Header of Process window


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94082 ce508802-f39f-4f6c-b175-0d175dae99d5
parent af9b2093
......@@ -52,6 +52,7 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc
PreparedStatement pstmt = null;
Connection conn = null;
ResultSet rs = null;
String bankCode="";
int cntHdr = 0;
double stdExchRate = 0,netAmtHdr = 0,billAmt = 0,billDiscAmt = 0;
......@@ -777,7 +778,7 @@ Put a validation chq amount in filter and total of details matches in case heade
java.sql.Timestamp dueDate = null,refDate = null;
String returnString = "",sql = "",sql2 = "",tranSer="";
String tranId = "",rcpMode = "",custDet = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",acctPrd = "",bankCode = "",bankName = "",acctCodeBal = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",acctPrd = "",bankName = "",acctCodeBal = "";
String cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",chgUser = "",chgTerm = "",custBankRef = "",acctCodeCfAr = "";
String invoiceId = "",lineNo = "",chequeNo = "",schequeDate = "",schqAmount = "",refNo = "",cctrCodeCfAr = "";
NodeList parentNodeList = null,parentNodeList2 = null;
......@@ -807,7 +808,7 @@ Put a validation chq amount in filter and total of details matches in case heade
siteCode = genericUtility.getColumnValue("site_code",headerDom);
//custCode = genericUtility.getColumnValue("cust_code",headerDom);
sdueDate = genericUtility.getColumnValue("due_date",headerDom);
bankCode= genericUtility.getColumnValue("bank_code",headerDom);//Added by manoj dtd 03/01/2014
System.out.println("siteCode in process() "+siteCode);
System.out.println("custCode in process() "+custCode);
writeLog(filePtr,"siteCode in process() "+siteCode,true);
......@@ -1195,7 +1196,7 @@ Put a validation chq amount in filter and total of details matches in case heade
receiptMap.put("ref_date",chequeDate);
receiptMap.put("remarks",remarks); //added by Kunal on 19/10/12
receiptMap.put("chq_amt",new Double(chqAmount));
receiptMap.put("bank_code",bankCode);//Added by Manoj dtd 03/01/2014
int ele = getListElement(receiptList, searchKey);
//int ele = getListElement(receiptList, chequeNo);
System.out.println("ele::::::::::"+ele);
......@@ -1293,6 +1294,7 @@ Put a validation chq amount in filter and total of details matches in case heade
custCode = receiptElements.getCustCode();
System.out.println("1187---custCode----"+custCode);
receiptMap = CustDetail(custCode, receiptMap,siteCode);//added by rajeshk to call method CustDetail
System.out.println("1298---receiptMap bank----"+receiptMap.get("bank_code"));
//tranId = generateTranTd("w_receipt_adv",trDate,siteCode);
tranId = generateTranTd("w_receivables_jv",trDate,siteCode,conn);
System.out.println("TranId :::::::::::::::::; "+tranId);
......@@ -1459,7 +1461,7 @@ Put a validation chq amount in filter and total of details matches in case heade
String sql = "";
//String siteCode = "";
String custName = "",acctCodeAr = "",cctrCodeAr = "",currCode = "",rcpMode = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",bankCode = "",bankName = "",acctCodeBal = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",bankName = "",acctCodeBal = "";
String cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",custBankRef = "",acctCodeCfAr = "";
String lineNo = "",cctrCodeCfAr = "";
boolean flag = false;
......@@ -1557,6 +1559,8 @@ Put a validation chq amount in filter and total of details matches in case heade
if(rcpMode.equalsIgnoreCase("C"))
{
try
{
if(bankCode==null || bankCode.trim().length()==0)//Condition added by manoj dtd 03/01/2014 to be set from header screen
{
sql = "SELECT CASH_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'";
writeLog(filePtr,sql,true);
......@@ -1571,6 +1575,7 @@ Put a validation chq amount in filter and total of details matches in case heade
rs.close();
pstmt.close();
}
}
catch (SQLException ex)
{
writeLog(filePtr,ex,true);
......@@ -1589,6 +1594,8 @@ Put a validation chq amount in filter and total of details matches in case heade
else if(!rcpMode.equalsIgnoreCase("C"))
{
try
{
if(bankCode==null || bankCode.trim().length()==0)//Condition added by manoj dtd 03/01/2014 to be set from header screen
{
sql = "SELECT BANK_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'";
writeLog(filePtr,sql,true);
......@@ -1603,6 +1610,7 @@ Put a validation chq amount in filter and total of details matches in case heade
rcpMap.put("bank_code",bankCode);
rs.close();
pstmt.close();
}
}
catch (SQLException ex)
......@@ -1723,7 +1731,7 @@ Put a validation chq amount in filter and total of details matches in case heade
PreparedStatement pstmt = null;
java.sql.Timestamp tranDate = null,dueDate = null,chgDate = null,refDate = null;
String tranId = "",siteCode = "",custCode = "",custName = "",acctCodeAr = "",cctrCodeAr = "",currCode = "",rcpMode = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",acctPrd = "",bankCode = "",bankName = "",acctCodeBal = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",acctPrd = "",bankName = "",acctCodeBal = "";
String cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",chgUser = "",chgTerm = "",custBankRef = "",refNo = "";
//String remarks = "AUTO-RECEIPT GENERATION";
String remarks = "";
......@@ -1749,7 +1757,7 @@ Put a validation chq amount in filter and total of details matches in case heade
cctrCodeAdv = (String)insertMap.get("cctr_code__adv");
finEntity = (String)insertMap.get("fin_entity");
acctPrd = (String)insertMap.get("acct_prd");
bankCode = (String)insertMap.get("bank_code");
//bankCode = (String)insertMap.get("bank_code");
bankName = (String)insertMap.get("bank_name");
acctCodeBal = (String)insertMap.get("acct_code__bal");
cctrCodeBal = (String)insertMap.get("cctr_code__bal");
......
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