Commit 4a61dce5 authored by manohar's avatar manohar

Calling of itemchanged avoided in gp list transform


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95551 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 54c21099
......@@ -17,6 +17,7 @@ import ibase.webitm.utility.GenericUtility;
import ibase.system.config.*;
import java.text.SimpleDateFormat;
import javax.ejb.Stateless; // added for ejb3
import ibase.webitm.ejb.fin.FinCommon;
@Stateless // added for ejb3
......@@ -430,27 +431,27 @@ public class ReceiptAdvAct extends ActionHandlerEJB implements ReceiptAdvActLoca
private String getGPListDetails(Document dom, Document dom1, String objContext, String xtraParams) throws RemoteException, ITMException
{
//Added by nisar on 04/01/08 for RID : SY6BAS0059
String siteCode = null;
String siteCodeInv = null;
String custCode = null;
String siteCode = null,currCode = "",hCurrCode = "",bdFluctuationCf = "N",rcpAutoFinchg = "N";
String siteCodeInv = null, billDisc = "N",lineNoRef = "1",refSer = "",refNo = "",fchgType = "";
String custCode = null,crTrem = "";
String custCodeS = null;
String detCnt = null;
String tranSer = null;
String sql = null;
String exchRateHeader = null;
String refNo = null;
String gpNo = null;
String remark = null;
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
Timestamp dueDate = null,refDate=null;
PreparedStatement pstmt = null;
ResultSet rs = null;
Date dueDate = null,refDate=null;
PreparedStatement pstmt = null,pstmt1 = null;
ResultSet rs = null, rs1 = null;
Connection conn = null;
double exchRateD = 0.0;
double totAmt = 0.0,adjAmt = 0.0,balance = 0.0,taxAmt = 0.0;
double discount = 0.0,rcptAmt= 0.0,diffamtexch=0.0;
double exchRateD = 0.0,exchRateRcv = 0, discExchRate = 0,billDiscAmt = 0;
double totAmt = 0.0,adjAmt = 0.0,balance = 0.0,taxAmt = 0.0,rcpAmt = 0;
double discount = 0.0,rcptAmt= 0.0,diffamtexch=0.0,badDebtAmt = 0,discountLc = 0,finChg = 0;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
......@@ -458,19 +459,21 @@ public class ReceiptAdvAct extends ActionHandlerEJB implements ReceiptAdvActLoca
NodeList parentNodeList = null;
Node parentNode=null;
String winName="";
int days = 0;
Date tranDate = null;
try
{
FinCommon finCommon = new FinCommon();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy-mm-dd");
//detCnt = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"detCnt");
//if (detCnt.equals("0"))
//{
System.out.println("dom1--> "+dom1);
conn = connDriver.getConnectDB("DriverITM");
siteCode = genericUtility.getColumnValue("site_code",dom1);
siteCodeInv = genericUtility.getColumnValue("site_code__inv",dom1);
hCurrCode = genericUtility.getColumnValue("curr_code", dom1);
custCode = genericUtility.getColumnValue("cust_code",dom1);
tranSer = genericUtility.getColumnValue("ref_ser",dom);
exchRateHeader = genericUtility.getColumnValue("exch_rate",dom1);//from header
......@@ -486,98 +489,25 @@ public class ReceiptAdvAct extends ActionHandlerEJB implements ReceiptAdvActLoca
{
siteCode=siteCodeInv;
}
rcpAutoFinchg = finCommon.getFinparams("999999", "RCP_AUTO_FINCHG",conn).trim();
if (rcpAutoFinchg.equals("") || rcpAutoFinchg == null )
{
rcpAutoFinchg = "N";
}
bdFluctuationCf = finCommon.getFinparams("999999", "BD_FLUCTUATION_CF",conn);
System.out.println("[ReceiptAdvActEJB] siteCode==>"+siteCode);
System.out.println("[ReceiptAdvActEJB] custCode==>"+custCode);
System.out.println("[ReceiptAdvActEJB] tranSer==>"+tranSer);
// //oracle syntax
// sql=" SELECT case when receivables.ref_no is null then '' else receivables.ref_no end ,"
// +" (case when despatch.gp_no is null then '' else despatch.gp_no end)as gp_no,receivables.due_date,"
// +" receivables.tot_amt,receivables.adj_amt,((receivables.tot_amt) - (receivables.adj_amt)) Balance,"
// +" fn_remark(ref_no,tran_ser) remark,receivables.cust_code,"
// +" receivables.tran_date, "
// +" receivables.ref_no, "
// +" receivables.ref_date, "
// +" receivables.curr_code, "
// +" currency.descr as curr_descr,"
// +" receivables.exch_rate, "
// +" receivables.acct_code, "
// +" accounts.descr as acct_descr,"
// +" receivables.cctr_code, "
// +" receivables.discount, "
// +" receivables.tax_amt, "
// +" receivables.bad_debt_amt "
// +" FROM invoice,despatch,receivables,customer,currency,accounts "
// +" WHERE ( invoice.desp_id = despatch.desp_id (+)) and "
// +" ( invoice.invoice_id (+) = receivables.ref_no) and "
// +" ( receivables.cust_code = customer.cust_code ) and "
// +"((customer.group_code = ( select group_code from customer where cust_code = '"+custCode+"') ) AND"
// +" ( receivables.site_code = '"+siteCode+"' ) AND "
// +" ( receivables.tran_ser = '"+tranSer+"' ) AND "
// +" ( ( RECEIVABLES.TOT_AMT- RECEIVABLES.ADJ_AMT) <> 0 ) ) and "
// +" receivables.curr_code = currency.curr_code and "
// +" receivables.acct_code = accounts.acct_code ";
/*
SELECT receivables.ref_no , despatch.gp_no , receivables.due_date ,
receivables.tot_amt , receivables.adj_amt ,
((receivables.tot_amt) - (receivables.adj_amt)) Balance,
fn_remark(ref_no,tran_ser) remark, receivables.cust_code
FROM invoice , despatch , receivables , customer
WHERE ( invoice.desp_id = despatch.desp_id (+))
and ( invoice.invoice_id (+) = receivables.ref_no)
and ( receivables.cust_code = customer.cust_code )
and ( ( customer.group_code in ( select group_code from customer where cust_code = 'AD0108') )
and ( receivables.site_code = 'SA117' )
and ( receivables.tran_ser = 'R-IBCA' )
and ( ( RECEIVABLES.TOT_AMT- RECEIVABLES.ADJ_AMT) <> 0 ) )
SELECT r.ref_no, r.tran_ser, d.gp_no, r.due_date,r.tot_amt, r.adj_amt, ((r.tot_amt) - (r.adj_amt)) Balance,
fn_remark(ref_no, tran_ser) remark, r.tran_date, r.ref_no, r.ref_date, r.curr_code, c.descr as curr_descr,
r.exch_rate, r.acct_code, a.descr as acct_descr, r.cctr_code, r.discount, r.tax_amt, r.bad_debt_amt
FROM ((((invoice i left outer join despatch d on i.desp_id = d.desp_id)
left outer join receivables r on r.ref_no = i.invoice_id )
inner join customer cu on r.cust_code = cu.cust_code)
inner join currency c on r.curr_code = c.curr_code)
inner join accounts a on r.acct_code = a.acct_code
WHERE cu.group_code in ( select group_code from customer where cust_code = 'AD0108')
AND r.site_code = 'SA117' AND r.tran_ser = 'R-IBCA' AND ( r.TOT_AMT- r.ADJ_AMT <> 0 )
*/
// NEW SQL FOR GPLIST
sql= "SELECT r.cust_code custcode,r.ref_no ref_no,r.tran_ser, r.gp_no dsp_gpno, r.due_date due_date," +
"r.tot_amt, r.adj_amt,((r.tot_amt) - (r.adj_amt)) Balance,fn_remark(ref_no, tran_ser) remark," +
"r.tran_date, r.ref_no, r.ref_date,r.curr_code, c.descr as curr_descr, r.exch_rate, r.acct_code, " +
"a.descr as acct_descr,r.cctr_code, r.discount, r.tax_amt, r.bad_debt_amt FROM " +
" r.tot_amt, r.adj_amt,((r.tot_amt) - (r.adj_amt)) Balance,fn_remark(r.ref_no, r.tran_ser) remark," +
" r.tran_date, r.ref_no, r.ref_date,r.curr_code, c.descr as curr_descr, r.exch_rate, r.acct_code, " +
" a.descr as acct_descr,r.cctr_code, r.discount, r.tax_amt, r.bad_debt_amt, r.bill_disc,r.line_no__ref, "+
" case when r.bad_debt_amt is null then 0 else r.bad_debt_amt end as bad_debt_amt " +
" FROM " +
"(("+
//Commened by manoj not required to join with invoice &depatch
//"((invoice i left outer join despatch d on i.desp_id = d.desp_id) left outer join" +
//" receivables r on r.ref_no = i.invoice_id ) "+
" receivables r inner join customer cu on r.cust_code = cu.cust_code) " +
"inner join currency c on r.curr_code = c.curr_code) inner join accounts a on r.acct_code = a.acct_code " +
"WHERE cu.group_code in ( select group_code from customer where cust_code = '"+custCode+"')" +
" inner join currency c on r.curr_code = c.curr_code) inner join accounts a on r.acct_code = a.acct_code " +
" WHERE cu.group_code in ( select group_code from customer where cust_code = '"+custCode+"')" +
" AND r.site_code = '"+siteCode+"' AND r.tran_ser = '"+tranSer+"' AND ( r.TOT_AMT- r.ADJ_AMT <> 0 ) " +
"order by r.cust_code,r.ref_no,dsp_gpno,due_date asc";
// COMMITED BY AKHILESH AAD NEW SQL ABOVE THIS QUERY
/*SQL= "SELECT R.CUST_CODE CUSTCODE,R.REF_NO, R.TRAN_SER, D.GP_NO DSP_GPNO, R.DUE_DATE DUE_DATE,R.TOT_AMT,"
+" R.ADJ_AMT, ((R.TOT_AMT) - (R.ADJ_AMT)) BALANCE, FN_REMARK(REF_NO, TRAN_SER) REMARK, "
+" R.TRAN_DATE, R.REF_NO, R.REF_DATE, R.CURR_CODE, "
+" C.DESCR AS CURR_DESCR, R.EXCH_RATE, R.ACCT_CODE, A.DESCR AS ACCT_DESCR, "
+" R.CCTR_CODE, R.DISCOUNT, R.TAX_AMT, R.BAD_DEBT_AMT "
+" FROM ((((INVOICE I "
+" LEFT OUTER JOIN DESPATCH D ON I.DESP_ID = D.DESP_ID) "
+" RIGHT OUTER JOIN RECEIVABLES R ON R.REF_NO = I.INVOICE_ID ) "
+" INNER JOIN CUSTOMER CU ON R.CUST_CODE = CU.CUST_CODE) "
+" INNER JOIN CURRENCY C ON R.CURR_CODE = C.CURR_CODE) "
+" INNER JOIN ACCOUNTS A ON R.ACCT_CODE = A.ACCT_CODE "
+" WHERE CU.GROUP_CODE IN ( SELECT GROUP_CODE FROM CUSTOMER WHERE CUST_CODE = '"+CUSTCODE+"') "
+" AND R.SITE_CODE = '"+SITECODE+"'"
+" AND R.TRAN_SER = '"+TRANSER+"' "
+" AND ( R.TOT_AMT- R.ADJ_AMT <> 0 ) ORDER BY R.CUST_CODE,R.REF_NO,DSP_GPNO,DUE_DATE ASC ";*/
System.out.println("[ReceiptAdvActEJB] sql==>"+sql);
" order by r.cust_code,r.ref_no,dsp_gpno,due_date asc";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
......@@ -585,8 +515,8 @@ public class ReceiptAdvAct extends ActionHandlerEJB implements ReceiptAdvActLoca
{
custCodeS = rs.getString("custcode");
gpNo = rs.getString("dsp_gpno");
dueDate = rs.getTimestamp("due_date");
refDate = rs.getTimestamp("ref_date");
dueDate = rs.getDate("due_date");
refDate = rs.getDate("ref_date");
totAmt = rs.getDouble("tot_amt");
adjAmt = rs.getDouble("adj_amt");
taxAmt = rs.getDouble("tax_amt");
......@@ -594,43 +524,151 @@ public class ReceiptAdvAct extends ActionHandlerEJB implements ReceiptAdvActLoca
remark = rs.getString("remark");
discount = rs.getDouble("discount");
rcptAmt = totAmt - adjAmt;
// 04/07/14 manoharan
refSer = rs.getString("tran_ser");
refNo = rs.getString("ref_no");
billDisc = rs.getString("bill_disc");
lineNoRef = rs.getString("line_no__ref");
currCode = rs.getString("curr_code");
exchRateRcv = rs.getDouble("exch_rate");
badDebtAmt = rs.getDouble("bad_debt_amt");
if ((lineNoRef == null) || "null".equals(lineNoRef) || (lineNoRef.trim().length() == 0))
{
lineNoRef = "1";
}
if ( !hCurrCode.trim().equals(currCode.trim()) )
{
exchRateD = finCommon.getDailyExchRateSellBuy(currCode,"",siteCode, genericUtility.getColumnValue("tran_date", dom1), "S", conn);
}
valueXmlString.append("<Detail>\r\n");
valueXmlString.append("<cust_code>").append("<![CDATA[").append(custCodeS).append("]]>").append("</cust_code>\r\n");
valueXmlString.append("<ref_no>").append("<![CDATA[").append(rs.getString("ref_no").trim()).append("]]>").append("</ref_no>\r\n");//Added srvCallOnChng by jiten 04/10/06
valueXmlString.append("<dsp_gpno>").append("<![CDATA[").append(gpNo==null?" ":gpNo.trim()).append("]]>").append("</dsp_gpno>\r\n");
valueXmlString.append("<due_date>").append("<![CDATA[").append(sdf.format(dueDate)).append("]]>").append("</due_date>\r\n");
valueXmlString.append("<net_amt>").append("<![CDATA[").append(totAmt).append("]]>").append("</net_amt>\r\n");
valueXmlString.append("<adj_amt>").append("<![CDATA[").append(adjAmt).append("]]>").append("</adj_amt>\r\n");
valueXmlString.append("<balance>").append("<![CDATA[").append(balance).append("]]>").append("</balance>\r\n");
valueXmlString.append("<remark>").append("<![CDATA[").append(remark==null?" ":remark.trim()).append("]]>").append("</remark>\r\n");
valueXmlString.append("<ref_ser>").append("<![CDATA[").append(tranSer.trim()).append("]]>").append("</ref_ser>\r\n");
valueXmlString.append("<rcp_amt>").append("<![CDATA[").append(rcptAmt).append("]]>").append("</rcp_amt>\r\n");
valueXmlString.append("<ref_no>").append("<![CDATA[").append(rs.getString("ref_no").trim()).append("]]>").append("</ref_no>\r\n");//Added srvCallOnChng by jiten 04/10/06
valueXmlString.append("<line_no__ref>").append("<![CDATA[" + lineNoRef + "]]>").append("</line_no__ref>\r\n");//Added srvCallOnChng by jiten 04/10/06
valueXmlString.append("<ref_date>").append("<![CDATA[").append(sdf.format(refDate)).append("]]>").append("</ref_date>\r\n");
valueXmlString.append("<curr_code>").append("<![CDATA[").append(rs.getString("curr_code")).append("]]>").append("</curr_code>\r\n");
valueXmlString.append("<exch_rate>").append("<![CDATA[").append(exchRateD).append("]]>").append("</exch_rate>\r\n");
valueXmlString.append("<exch_rate__rcv>").append("<![CDATA[").append(rs.getDouble("exch_rate")).append("]]>").append("</exch_rate__rcv>\r\n");
System.out.println("winName----"+winName);
valueXmlString.append("<disc_amt>").append("<![CDATA[").append(discount).append("]]>").append("</disc_amt>\r\n");
valueXmlString.append("<tax_amt>").append("<![CDATA[0]]>").append("</tax_amt>\r\n");
valueXmlString.append("<exch_rate>").append("<![CDATA[").append(exchRateD).append("]]>").append("</exch_rate>\r\n");
valueXmlString.append("<net_amt>").append("<![CDATA[").append(totAmt).append("]]>").append("</net_amt>\r\n");
valueXmlString.append("<rcp_amt>").append("<![CDATA[").append(rcptAmt).append("]]>").append("</rcp_amt>\r\n");
if ((billDisc == null) || (billDisc.trim().length() == 0))
{
billDisc = "N";
}
if (billDisc.trim().equalsIgnoreCase("Y"))
{
sql = "select export_fund.exch_rate,export_fundet.amount from export_fund, export_fundet where ( export_fund.tran_id = export_fundet.tran_id ) and ( export_fund.confirmed = 'Y' ) and ( ( export_fundet.ref_ser = ? ) and ( export_fundet.ref_no = ? ) )";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, refSer);
pstmt1.setString(2, refNo);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
discExchRate = rs1.getDouble(1);
billDiscAmt = rs1.getDouble(2);
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
valueXmlString.append("<bill_disc_amt>").append("<![CDATA[" + billDiscAmt + "]]>").append("</bill_disc_amt>\r\n");
}
else
{
valueXmlString.append("<bill_disc_amt>").append("<![CDATA[0]]>").append("</bill_disc_amt>\r\n");
}
valueXmlString.append("<bill_disc>").append("<![CDATA[" + billDisc + "]]>").append("</bill_disc>\r\n");
//Added by manoj dtd 13102012 to make workable for Customer remittence
if(!"w_rcp_tr".equalsIgnoreCase(winName))
{
diffamtexch = ((rcptAmt * exchRateD) - (rcptAmt * Double.parseDouble(exchRateHeader)));
valueXmlString.append("<diff_amt__exch>").append("<![CDATA[").append(diffamtexch).append("]]>").append("</diff_amt__exch>\r\n");
if (("Y".equals(billDisc)) && ("Y".equals(bdFluctuationCf)))
{
valueXmlString.append("<exch_rate>").append("<![CDATA[" + discExchRate + "]]>").append("</exch_rate>\r\n");
diffamtexch = (rcpAmt * exchRateRcv) - (rcpAmt * discExchRate);
valueXmlString.append("<diff_amt__exch>").append("<![CDATA[" + diffamtexch + "]]>").append("</diff_amt__exch>\r\n");
}
else
{
diffamtexch = (rcpAmt * exchRateRcv) - (rcpAmt * exchRateD);
valueXmlString.append("<diff_amt__exch>").append("<![CDATA[").append(diffamtexch).append("]]>").append("</diff_amt__exch>\r\n");
}
}
valueXmlString.append("<disc_amt>").append("<![CDATA[").append(discount).append("]]>").append("</disc_amt>\r\n");
valueXmlString.append("<tax_amt>").append("<![CDATA[").append(taxAmt).append("]]>").append("</tax_amt>\r\n");
valueXmlString.append("<ref_date>").append("<![CDATA[").append(sdf.format(refDate)).append("]]>").append("</ref_date>\r\n");
valueXmlString.append("<cust_code>").append("<![CDATA[").append(custCodeS).append("]]>").append("</cust_code>\r\n");
valueXmlString.append("<due_date>").append("<![CDATA[").append(sdf.format(dueDate)).append("]]>").append("</due_date>\r\n");
valueXmlString.append("<acct_code__ar>").append("<![CDATA[").append(rs.getString("acct_code")).append("]]>").append("</acct_code__ar>\r\n");
valueXmlString.append("<accounts_descr>").append("<![CDATA[").append(rs.getString("acct_descr").trim()).append("]]>").append("</accounts_descr>\r\n");
valueXmlString.append("<cctr_code__ar>").append("<![CDATA[").append(rs.getString("cctr_code")).append("]]>").append("</cctr_code__ar>\r\n");
valueXmlString.append("<dsp_gpno>").append("<![CDATA[").append(gpNo==null?" ":gpNo.trim()).append("]]>").append("</dsp_gpno>\r\n");
valueXmlString.append("<adj_amt>").append("<![CDATA[").append(adjAmt).append("]]>").append("</adj_amt>\r\n");
valueXmlString.append("<balance>").append("<![CDATA[").append(balance).append("]]>").append("</balance>\r\n");
valueXmlString.append("<remark>").append("<![CDATA[").append(remark==null?" ":remark.trim()).append("]]>").append("</remark>\r\n");
valueXmlString.append("<due_date>").append("<![CDATA[").append(sdf.format(dueDate)).append("]]>").append("</due_date>\r\n");
valueXmlString.append("<bad_debt_amt>").append("<![CDATA[").append(badDebtAmt).append("]]>").append("</bad_debt_amt>\r\n");
valueXmlString.append("<accounts_descr>").append("<![CDATA[").append(rs.getString("acct_descr").trim()).append("]]>").append("</accounts_descr>\r\n");
valueXmlString.append("<currency_descr>").append("<![CDATA[").append(rs.getString("curr_descr").trim()).append("]]>").append("</currency_descr>\r\n");
discountLc = 0;
if ("Y".equals(rcpAutoFinchg))
{
if ("S-INV".equals(refSer.trim()))
{
sql = "select due_date,cr_term from invoice where invoice_id = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, refNo);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
dueDate = rs1.getDate(1);
crTrem = rs1.getString(2);
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
tranDate = new java.sql.Date(new java.util.Date().getTime()); // dateFormat1.parse(genericUtility.getColumnValue("tran_date", dom1));
if (tranDate.before(dueDate))
{
days = (int)(dueDate.getTime() - tranDate.getTime()) / 361440000;
if (days > 0)
{
sql = "select fchg_type,case when fin_chg is null then 0 else fin_chg end from crtermfc where (min_day <= ? and max_day >= ? ) and cr_term = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setInt(1, days);
pstmt1.setInt(2, days);
pstmt1.setString(3, crTrem);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
finChg = rs1.getDouble(1);
fchgType = rs1.getString(2);
if (finChg == 0.0D) finChg = 0.0D;
if (discountLc == 0.0D) discountLc = 0.0D;
if ("P".equals(fchgType))
{
discountLc = rcpAmt * (finChg / 36500.0D) * days;
}
else
{
discountLc = finChg;
}
discountLc = Math.round(discountLc) * -1L;
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
}
}
}
valueXmlString.append("<fin_chg>").append("<![CDATA[" + discountLc + "]]>").append("</fin_chg>\r\n");
valueXmlString.append("</Detail>\r\n");
}//end of while(rs.next();
......@@ -663,46 +701,57 @@ public class ReceiptAdvAct extends ActionHandlerEJB implements ReceiptAdvActLoca
System.out.println("[ReceiptAdvActEJB] gpListTransform is calling.............");
Connection conn = null;
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
Node currDetail = null, currDetail1 = null;
int count = 0;
Node currDetail1 = null;
int count = 0, ctr = 0;
double stkQty = 0;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
GenericUtility genericUtility = GenericUtility.getInstance();
String lineNoRef = "1", refSer = "", refNo = "", sql = "",billDisc = "N";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
conn = connDriver.getConnectDB("DriverITM");
NodeList detailList = selDataDom.getElementsByTagName("Detail");
int noOfDetails = detailList.getLength();
for(int ctr = 0; ctr < noOfDetails; ctr++)
/*for(int ctr = 0; ctr < noOfDetails; ctr++)
{
currDetail = detailList.item(ctr);
}
}*/
if (noOfDetails > 0)
{
for(int ctr = 0; ctr < noOfDetails ; ctr++)
for(int ctrTmp = 0; ctrTmp < noOfDetails ; ctrTmp++)
{
valueXmlString.append("<Detail>");
currDetail1 = detailList.item(ctr);
valueXmlString.append("<ref_ser isSrvCallOnChg='1'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("ref_ser", currDetail1)).append("]]>").append("</ref_ser>\r\n");
valueXmlString.append("<ref_no isSrvCallOnChg='1'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("ref_no", currDetail1)).append("]]>").append("</ref_no>\r\n");//Added srvCallOnChng by jiten 04/10/06
valueXmlString.append("<rcp_amt>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("rcp_amt", currDetail1)).append("]]>").append("</rcp_amt>\r\n");
valueXmlString.append("<curr_code>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("curr_code", currDetail1)).append("]]>").append("</curr_code>\r\n");
valueXmlString.append("<exch_rate>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("exch_rate", currDetail1)).append("]]>").append("</exch_rate>\r\n");
valueXmlString.append("<exch_rate__rcv>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("exch_rate__rcv", currDetail1)).append("]]>").append("</exch_rate__rcv>\r\n");
valueXmlString.append("<diff_amt__exch>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("diff_amt__exch", currDetail1)).append("]]>").append("</diff_amt__exch>\r\n");
valueXmlString.append("<disc_amt>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("disc_amt", currDetail1)).append("]]>").append("</disc_amt>\r\n");
//valueXmlString.append("<tax_amt>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("tax_amt", currDetail1)).append("]]>").append("</tax_amt>\r\n");
valueXmlString.append("<net_amt>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("net_amt", currDetail1)).append("]]>").append("</net_amt>\r\n");
valueXmlString.append("<ref_date>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("ref_date", currDetail1)).append("]]>").append("</ref_date>\r\n");
valueXmlString.append("<due_date>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("due_date", currDetail1)).append("]]>").append("</due_date>\r\n");
valueXmlString.append("<acct_code__ar>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("acct_code__ar", currDetail1)).append("]]>").append("</acct_code__ar>\r\n");
valueXmlString.append("<accounts_descr>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("accounts_descr", currDetail1)).append("]]>").append("</accounts_descr>\r\n");
valueXmlString.append("<cctr_code__ar>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("cctr_code__ar", currDetail1)).append("]]>").append("</cctr_code__ar>\r\n");
valueXmlString.append("<cust_code>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("cust_code", currDetail1)).append("]]>").append("</cust_code>\r\n");
valueXmlString.append("<currency_descr>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("currency_descr", currDetail1)).append("]]>").append("</currency_descr>\r\n");
valueXmlString.append("<dsp_gpno>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("dsp_gpno", currDetail1)).append("]]>").append("</dsp_gpno>\r\n");
currDetail1 = detailList.item(ctrTmp);
valueXmlString.append("<ref_ser isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("ref_ser", currDetail1)).append("]]>").append("</ref_ser>\r\n");
valueXmlString.append("<ref_no isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("ref_no", currDetail1)).append("]]>").append("</ref_no>\r\n");//Added srvCallOnChng by jiten 04/10/06
valueXmlString.append("<line_no__ref isSrvCallOnChg='0'>").append("<![CDATA[" + lineNoRef + "]]>").append("</line_no__ref>\r\n");//Added srvCallOnChng by jiten 04/10/06
valueXmlString.append("<rcp_amt isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("rcp_amt", currDetail1)).append("]]>").append("</rcp_amt>\r\n");
valueXmlString.append("<curr_code isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("curr_code", currDetail1)).append("]]>").append("</curr_code>\r\n");
valueXmlString.append("<exch_rate isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("exch_rate", currDetail1)).append("]]>").append("</exch_rate>\r\n");
valueXmlString.append("<exch_rate__rcv isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("exch_rate__rcv", currDetail1)).append("]]>").append("</exch_rate__rcv>\r\n");
valueXmlString.append("<diff_amt__exch isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("diff_amt__exch", currDetail1)).append("]]>").append("</diff_amt__exch>\r\n");
valueXmlString.append("<disc_amt isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("disc_amt", currDetail1)).append("]]>").append("</disc_amt>\r\n");
valueXmlString.append("<tax_amt isSrvCallOnChg='0'>").append("<![CDATA[0.00]]>").append("</tax_amt>\r\n");
valueXmlString.append("<net_amt isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("net_amt", currDetail1)).append("]]>").append("</net_amt>\r\n");
valueXmlString.append("<ref_date isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("ref_date", currDetail1)).append("]]>").append("</ref_date>\r\n");
valueXmlString.append("<due_date isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("due_date", currDetail1)).append("]]>").append("</due_date>\r\n");
valueXmlString.append("<acct_code__ar isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("acct_code__ar", currDetail1)).append("]]>").append("</acct_code__ar>\r\n");
valueXmlString.append("<accounts_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("accounts_descr", currDetail1)).append("]]>").append("</accounts_descr>\r\n");
valueXmlString.append("<cctr_code__ar isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("cctr_code__ar", currDetail1)).append("]]>").append("</cctr_code__ar>\r\n");
valueXmlString.append("<cust_code isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("cust_code", currDetail1)).append("]]>").append("</cust_code>\r\n");
valueXmlString.append("<currency_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("currency_descr", currDetail1)).append("]]>").append("</currency_descr>\r\n");
valueXmlString.append("<dsp_gpno isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("dsp_gpno", currDetail1)).append("]]>").append("</dsp_gpno>\r\n");
valueXmlString.append("<bill_disc_amt isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("bill_disc_amt", currDetail1)).append("]]>").append("</bill_disc_amt>\r\n");
valueXmlString.append("<bill_disc isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("bill_disc", currDetail1)).append("]]>").append("</bill_disc>\r\n");
valueXmlString.append("<bad_debt_amt isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("bad_debt_amt", currDetail1)).append("]]>").append("</bad_debt_amt>\r\n");
valueXmlString.append("<fin_chg isSrvCallOnChg='0'>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("fin_chg", currDetail1)).append("]]>").append("</fin_chg>\r\n");
valueXmlString.append("</Detail>");
}// for end
......
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