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 ...@@ -52,6 +52,7 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
Connection conn = null; Connection conn = null;
ResultSet rs = null; ResultSet rs = null;
String bankCode="";
int cntHdr = 0; int cntHdr = 0;
double stdExchRate = 0,netAmtHdr = 0,billAmt = 0,billDiscAmt = 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 ...@@ -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; java.sql.Timestamp dueDate = null,refDate = null;
String returnString = "",sql = "",sql2 = "",tranSer=""; String returnString = "",sql = "",sql2 = "",tranSer="";
String tranId = "",rcpMode = "",custDet = ""; 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 cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",chgUser = "",chgTerm = "",custBankRef = "",acctCodeCfAr = "";
String invoiceId = "",lineNo = "",chequeNo = "",schequeDate = "",schqAmount = "",refNo = "",cctrCodeCfAr = ""; String invoiceId = "",lineNo = "",chequeNo = "",schequeDate = "",schqAmount = "",refNo = "",cctrCodeCfAr = "";
NodeList parentNodeList = null,parentNodeList2 = null; NodeList parentNodeList = null,parentNodeList2 = null;
...@@ -807,7 +808,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -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); siteCode = genericUtility.getColumnValue("site_code",headerDom);
//custCode = genericUtility.getColumnValue("cust_code",headerDom); //custCode = genericUtility.getColumnValue("cust_code",headerDom);
sdueDate = genericUtility.getColumnValue("due_date",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("siteCode in process() "+siteCode);
System.out.println("custCode in process() "+custCode); System.out.println("custCode in process() "+custCode);
writeLog(filePtr,"siteCode in process() "+siteCode,true); 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 ...@@ -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("ref_date",chequeDate);
receiptMap.put("remarks",remarks); //added by Kunal on 19/10/12 receiptMap.put("remarks",remarks); //added by Kunal on 19/10/12
receiptMap.put("chq_amt",new Double(chqAmount)); 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, searchKey);
//int ele = getListElement(receiptList, chequeNo); //int ele = getListElement(receiptList, chequeNo);
System.out.println("ele::::::::::"+ele); System.out.println("ele::::::::::"+ele);
...@@ -1293,6 +1294,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -1293,6 +1294,7 @@ Put a validation chq amount in filter and total of details matches in case heade
custCode = receiptElements.getCustCode(); custCode = receiptElements.getCustCode();
System.out.println("1187---custCode----"+custCode); System.out.println("1187---custCode----"+custCode);
receiptMap = CustDetail(custCode, receiptMap,siteCode);//added by rajeshk to call method CustDetail 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_receipt_adv",trDate,siteCode);
tranId = generateTranTd("w_receivables_jv",trDate,siteCode,conn); tranId = generateTranTd("w_receivables_jv",trDate,siteCode,conn);
System.out.println("TranId :::::::::::::::::; "+tranId); System.out.println("TranId :::::::::::::::::; "+tranId);
...@@ -1459,7 +1461,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -1459,7 +1461,7 @@ Put a validation chq amount in filter and total of details matches in case heade
String sql = ""; String sql = "";
//String siteCode = ""; //String siteCode = "";
String custName = "",acctCodeAr = "",cctrCodeAr = "",currCode = "",rcpMode = ""; 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 cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",custBankRef = "",acctCodeCfAr = "";
String lineNo = "",cctrCodeCfAr = ""; String lineNo = "",cctrCodeCfAr = "";
boolean flag = false; boolean flag = false;
...@@ -1558,18 +1560,21 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -1558,18 +1560,21 @@ Put a validation chq amount in filter and total of details matches in case heade
{ {
try try
{ {
sql = "SELECT CASH_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'"; if(bankCode==null || bankCode.trim().length()==0)//Condition added by manoj dtd 03/01/2014 to be set from header screen
writeLog(filePtr,sql,true);
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{ {
bankCode = rs.getString(1); sql = "SELECT CASH_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'";
writeLog(filePtr,sql,true);
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
bankCode = rs.getString(1);
}
System.out.println("CASH_CODE ::: "+bankCode);
rcpMap.put("bank_code",bankCode);
rs.close();
pstmt.close();
} }
System.out.println("CASH_CODE ::: "+bankCode);
rcpMap.put("bank_code",bankCode);
rs.close();
pstmt.close();
} }
catch (SQLException ex) catch (SQLException ex)
{ {
...@@ -1590,19 +1595,22 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -1590,19 +1595,22 @@ Put a validation chq amount in filter and total of details matches in case heade
{ {
try try
{ {
sql = "SELECT BANK_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'"; if(bankCode==null || bankCode.trim().length()==0)//Condition added by manoj dtd 03/01/2014 to be set from header screen
writeLog(filePtr,sql,true);
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{ {
bankCode = rs.getString(1); sql = "SELECT BANK_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'";
writeLog(filePtr,sql,true);
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
bankCode = rs.getString(1);
}
System.out.println("BANK_CODE ::: "+bankCode);
rcpMap.put("bank_code",bankCode);
rs.close();
pstmt.close();
} }
System.out.println("BANK_CODE ::: "+bankCode);
rcpMap.put("bank_code",bankCode);
rs.close();
pstmt.close();
} }
catch (SQLException ex) catch (SQLException ex)
...@@ -1723,7 +1731,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -1723,7 +1731,7 @@ Put a validation chq amount in filter and total of details matches in case heade
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
java.sql.Timestamp tranDate = null,dueDate = null,chgDate = null,refDate = null; java.sql.Timestamp tranDate = null,dueDate = null,chgDate = null,refDate = null;
String tranId = "",siteCode = "",custCode = "",custName = "",acctCodeAr = "",cctrCodeAr = "",currCode = "",rcpMode = ""; 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 cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",chgUser = "",chgTerm = "",custBankRef = "",refNo = "";
//String remarks = "AUTO-RECEIPT GENERATION"; //String remarks = "AUTO-RECEIPT GENERATION";
String remarks = ""; String remarks = "";
...@@ -1749,7 +1757,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -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"); cctrCodeAdv = (String)insertMap.get("cctr_code__adv");
finEntity = (String)insertMap.get("fin_entity"); finEntity = (String)insertMap.get("fin_entity");
acctPrd = (String)insertMap.get("acct_prd"); acctPrd = (String)insertMap.get("acct_prd");
bankCode = (String)insertMap.get("bank_code"); //bankCode = (String)insertMap.get("bank_code");
bankName = (String)insertMap.get("bank_name"); bankName = (String)insertMap.get("bank_name");
acctCodeBal = (String)insertMap.get("acct_code__bal"); acctCodeBal = (String)insertMap.get("acct_code__bal");
cctrCodeBal = (String)insertMap.get("cctr_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