Commit 812e3587 authored by kmandhre's avatar kmandhre

set ref_no ,remark in receipt


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92014 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 964c8ebc
......@@ -45,6 +45,7 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc
String custCodeTo = "";
String custCode = "";
String sdueDate = "";
String remarks = "";
java.sql.Timestamp dueDate = null;
ArrayList invoiceList = new ArrayList();
boolean amtFlag = true;
......@@ -222,6 +223,8 @@ Put a validation chq amount in filter and total of details matches in case heade
custCodeTo = genericUtility.getColumnValue("cust_code__to",headerDom);//added by rajesh k to get cust_code__to
filterChqNo = genericUtility.getColumnValue("cheque_no",headerDom);
sFilterChqAmt = genericUtility.getColumnValue("cheque_amount",headerDom);
remarks = genericUtility.getColumnValue("remarks",headerDom); //added by Kunal on 19/10/12
System.out.println("remarks"+remarks+" filterChqNo="+filterChqNo);
sFilterChqDate = genericUtility.getColumnValue("cheque_date",headerDom);
if (filterChqNo == null || filterChqNo.trim().length() == 0)
{
......@@ -326,7 +329,8 @@ Put a validation chq amount in filter and total of details matches in case heade
+ "AND E.REF_NO IS NOT NULL "
+ "AND A.SITE_CODE = ? "
//+ "AND A.CUST_CODE >= '"+custCodeFrom.trim()+"' AND A.CUST_CODE <= '"+custCodeTo.trim()+"' "
+ " c.group_code in ( select distinct group_code from customer where cust_code >= ? and cust_code <= ?) "
//+ " c.cust_code in ( select distinct group_code from customer where cust_code >= ? and cust_code <= ?) "
+" and a.cust_code in (select cust_code from customer where group_code in ( select distinct group_code from customer where group_code >= ? and group_code <= ? ) ) " //added by Kunal on 19/10/12
// + "AND A.DUE_DATE = ? "
// + "AND D.EXP_RCP_DATE = ? "//CHANGES MADE ON 18/12/2006 AND A.DUE_DATE->D.EXP_RCP_DATE
+ "AND ((D.DUE_DATE >= ? "//CHANGES MADE ON 18/12/2006 AND A.DUE_DATE->D.EXP_RCP_DATE
......@@ -351,7 +355,8 @@ Put a validation chq amount in filter and total of details matches in case heade
//+ "AND E.REF_NO IS NOT NULL "
+ "AND A.SITE_CODE = ? "
//+ "AND A.CUST_CODE >= '"+custCodeFrom.trim()+"' AND A.CUST_CODE <= '"+custCodeTo.trim()+"' "
+ " and c.group_code in ( select distinct group_code from customer where cust_code >= ? and cust_code <= ?) "
//+ " and c.group_code in ( select distinct group_code from customer where cust_code >= ? and cust_code <= ?) "
+" and a.cust_code in (select cust_code from customer where group_code in ( select distinct group_code from customer where group_code >= ? and group_code <= ? ) ) "
// + "AND A.DUE_DATE = ? "
// + "AND D.EXP_RCP_DATE = ? "//CHANGES MADE ON 18/12/2006 AND A.DUE_DATE->D.EXP_RCP_DATE
+ "AND ((D.DUE_DATE >= ? "//CHANGES MADE ON 18/12/2006 AND A.DUE_DATE->D.EXP_RCP_DATE
......@@ -395,6 +400,7 @@ Put a validation chq amount in filter and total of details matches in case heade
retTabSepStrBuff.append("0").append("\t");
//CHEQUE_NO
// 20/07/12 manoharan if cheque number is not specified in sales order set from augument
System.out.println("ch no 1 = "+rs.getString(8));
if(rs.getString(8)==null || rs.getString(8).trim().length() == 0)
{
retTabSepStrBuff.append(filterChqNo).append("\t");
......@@ -453,7 +459,8 @@ Put a validation chq amount in filter and total of details matches in case heade
+ "AND D.TOT_AMT - D.ADJ_AMT <> 0 "
+ "AND D.SITE_CODE = ? " //'"+siteCode.trim()+"' "
//+ "AND D.CUST_CODE >= '"+custCodeFrom.trim()+"' AND D.CUST_CODE <= '"+custCodeTo.trim()+"' "
+ " and c.group_code in ( select distinct group_code from customer where cust_code >= ? and cust_code <= ?) "
//+ " and c.group_code in ( select distinct group_code from customer where cust_code >= ? and cust_code <= ?) "
+" and C.cust_code in (select cust_code from customer where group_code in ( select distinct group_code from customer where group_code >= ? and group_code <= ? ) ) "
+ "AND ((D.DUE_DATE >= ? "//CHANGES MADE ON 18/12/2006 AND A.DUE_DATE->D.EXP_RCP_DATE
+ "AND D.DUE_DATE <= ? ) OR (D.DUE_DATE IS NULL)) "//CHANGES MADE ON 18/12/2006 AND A.DUE_DATE->D.EXP_RCP_DATE
+ "ORDER BY D.DUE_DATE ";
......@@ -468,6 +475,7 @@ Put a validation chq amount in filter and total of details matches in case heade
rs = pstmt.executeQuery();
while (rs.next())
{
System.out.println("ch no 1 = "+rs.getString(8));
//INVOICE_ID
retTabSepStrBuff.append(rs.getString(1)).append("\t");
//TRAN_SERNO
......@@ -490,7 +498,15 @@ Put a validation chq amount in filter and total of details matches in case heade
//adj_AMT
retTabSepStrBuff.append(rs.getDouble("ADJ_AMT")).append("\t");
//CHEQUE_NO
retTabSepStrBuff.append(rs.getString(8)).append("\t");
if(rs.getString(8)==null || rs.getString(8).trim().length() == 0) //change done by Kunal on 19/10/12
{
retTabSepStrBuff.append(filterChqNo).append("\t");
}
else
{
retTabSepStrBuff.append((rs.getString(8)==null?" ":rs.getString(8).trim())).append("\t");
}
//retTabSepStrBuff.append(rs.getString(8)).append("\t");
//CUST_NAME
retTabSepStrBuff.append(rs.getString(5)).append("\t");
//due_date
......@@ -546,7 +562,8 @@ Put a validation chq amount in filter and total of details matches in case heade
//CUST_CODE
retTabSepStrBuff.append(rs.getString(10)).append("\t");//added by rajesh k to append cust_code
//cust_ref_amt
retTabSepStrBuff.append(rs.getDouble("CUST_REF_AMT")).append("\n");
retTabSepStrBuff.append(rs.getDouble("CUST_REF_AMT")).append("\t");
retTabSepStrBuff.append(remarks).append("\n");
System.out.println("INVOICE_ID :::::::: "+rs.getString(1));
writeLog(filePtr,"%%%%%%%%% INVOICE_ID :::."+rs.getString(1),true);
writeLog(filePtr,"%%%%%%%%% CHEQUE_DATE :::."+rs.getString(7),true);
......@@ -1000,6 +1017,11 @@ Put a validation chq amount in filter and total of details matches in case heade
custCode = (childNode.getFirstChild().getNodeValue()).trim();
System.out.println("cust_code :::::"+ custCode);
}
if (childNodeName.equals("remarks"))//added by kunal on 19/10/12
{
remarks = (childNode.getFirstChild().getNodeValue()).trim();
System.out.println("remarks :::::"+ remarks);
}
}//inner for
searchKey = chequeNo + ":" + custCode; //added by rajesh k to concate chequeNo and custCode
writeLog(filePtr,"chequeNo::::: "+chequeNo,true);
......@@ -1031,6 +1053,7 @@ Put a validation chq amount in filter and total of details matches in case heade
receiptMap.put("ref_no",chequeNo);
receiptMap.put("cust_code",custCode);// added by rajesh k to put custcode in map
receiptMap.put("ref_date",chequeDate);
receiptMap.put("remarks",remarks); //added by Kunal on 19/10/12
receiptMap.put("chq_amt",new Double(chqAmount));
int ele = getListElement(receiptList, searchKey);
......@@ -1546,7 +1569,8 @@ Put a validation chq amount in filter and total of details matches in case heade
String tranId = "",siteCode = "",custCode = "",custName = "",acctCodeAr = "",cctrCodeAr = "",currCode = "",rcpMode = "";
String acctCodeAdv = "",cctrCodeAdv = "",finEntity = "",acctPrd = "",bankCode = "",bankName = "",acctCodeBal = "";
String cctrCodeBal = "",acctCodeCf = "",cctrCodeCf = "",chgUser = "",chgTerm = "",custBankRef = "",refNo = "";
String remarks = "AUTO-RECEIPT GENERATION";
//String remarks = "AUTO-RECEIPT GENERATION";
String remarks = "";
double advAmt = 0,exchRate = 0,chqAmt = 0;
int count = 0;
double initialValue=0.0;
......@@ -1579,6 +1603,8 @@ Put a validation chq amount in filter and total of details matches in case heade
chgTerm = (String)insertMap.get("chg_term");
custBankRef = (String)insertMap.get("cust_bank_ref");
exchRate = ((Double)insertMap.get("std_exrt")).doubleValue();
remarks = (String)insertMap.get("remarks");//added by Kunal
System.out.println("remarks:::"+remarks);
chqAmt = chequeAmtToHdr;//((Double)insertMap.get("chq_amt")).doubleValue();
System.out.println("The TranId while inserting the record :::::::: "+tranId);
......@@ -1588,8 +1614,8 @@ Put a validation chq amount in filter and total of details matches in case heade
+ "EFF_DATE,SITE_CODE,CHG_DATE,CHG_USER,CHG_TERM,ACCT_CODE__AR,CCTR_CODE__AR,"
+ "CURR_CODE,ACCT_CODE__ADV,CCTR_CODE__ADV,CUST_BANK_REF,EXCH_RATE,EXCH_RATE_SPOT,"
+ "FIN_ENTITY,ACCT_CODE__BAL,CCTR_CODE__BAL,ACCT_CODE__CF,CCTR_CODE__CF,REMARKS,CHQ_AMT, CONFIRMED, OTH_AMT,ADV_AMT,"
+" ADVADJ_AMT,NET_AMT,NET_AMT__BC ) "
+ "VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'N',?,?,?,?,? )";
+" ADVADJ_AMT,NET_AMT,NET_AMT__BC,TRAN_TYPE ) "
+ "VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'N',?,?,?,?,? ,'J')";
System.out.println("Insert SQL ::- "+sql);
writeLog(filePtr,"Insert SQL ::- "+sql,true);
......
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