Commit 316f1dc2 authored by dpawar's avatar dpawar

arrange columns as per requirement


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93348 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 020d21cd
......@@ -35,7 +35,7 @@ import javax.ejb.Stateless; // added for ejb3
@Stateless // added for ejb3
public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrcLocal ,GenerateReceiptPrcRemote //SessionBean
{
{
ibase.webitm.utility.GenericUtility genericUtility = ibase.webitm.utility.GenericUtility.getInstance();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
CommonConstants commonConstants = new CommonConstants();
......@@ -190,7 +190,7 @@ Put a validation chq amount in filter and total of details matches in case heade
siteCode = genericUtility.getColumnValue("site_code",headerDom);
writeLog(filePtr,"siteCode:::"+siteCode,true);
System.out.println("siteCode :::- "+ siteCode);
System.out.println("siteCode------>"+ siteCode);
if(siteCode == null || siteCode.trim().length() == 0)
{
......@@ -503,41 +503,56 @@ Put a validation chq amount in filter and total of details matches in case heade
{
retTabSepStrBuff.append("<Detail2>");
System.out.println("ch no 1 = "+rs.getString(8));
//TRAN_SERNO
//retTabSepStrBuff.append(rs.getString(2)).append("\t");
retTabSepStrBuff.append("<tran_ser>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</tran_ser>");
//INVOICE_ID
//retTabSepStrBuff.append(rs.getString(1)).append("\t");
//added by kunal on 04/02/13 Data set in Xml string format
//added by kunal on 04/02/13 Data set in Xml string format
retTabSepStrBuff.append("<invoice_id>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</invoice_id>");
retTabSepStrBuff.append("<invoice_id>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</invoice_id>");
//TRAN_SERNO
//retTabSepStrBuff.append(rs.getString(2)).append("\t");
retTabSepStrBuff.append("<tran_ser>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</tran_ser>");
//cust_ref_no
if (rs.getString("CUST_REF_NO") == null || rs.getString("CUST_REF_NO").trim().length() == 0)
{
//retTabSepStrBuff.append("").append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[]]>").append("</cust_ref_no>");
}
else
{
//retTabSepStrBuff.append(rs.getString("CUST_REF_NO")).append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[" +rs.getString("CUST_REF_NO") +"]]>").append("</cust_ref_no>");
}
//TRAN_DATE
//retTabSepStrBuff.append(rs.getDate(3)).append("\t");
System.out.println(sdf.format(rs.getTimestamp(3)));
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp(3))).append("\t");
retTabSepStrBuff.append("<tran_date>").append("<![CDATA[" +sdf.format(rs.getTimestamp(3)) +"]]>").append("</tran_date>");
//TOT_AMT
//retTabSepStrBuff.append(rs.getDouble("TOT_AMT")).append("\n");
retTabSepStrBuff.append("<tot_amt>").append("<![CDATA["+rs.getDouble("TOT_AMT")+"]]>").append("</tot_amt>");
//INV_AMT
//retTabSepStrBuff.append(rs.getDouble(4)).append("\t");
retTabSepStrBuff.append("<inv_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</inv_amt>");
//Added by manoj dtd 18/10/2012 to display absolute value
//retTabSepStrBuff.append(Math.abs(rs.getDouble(4))).append("\t");
retTabSepStrBuff.append("<bal_amt>").append("<![CDATA[" +Math.abs(rs.getDouble(4)) +"]]>").append("</bal_amt>");
retTabSepStrBuff.append("<bal_amt>").append("<![CDATA[" +Math.abs(rs.getDouble(4)) +"]]>").append("</bal_amt>");
//adj_AMT
//retTabSepStrBuff.append(rs.getDouble(4)).append("\t");
retTabSepStrBuff.append("<adj_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</adj_amt>");
// adjusted_amt
//retTabSepStrBuff.append(rs.getDouble("ADJ_AMT")).append("\t");
retTabSepStrBuff.append("<adjusted_amt>").append("<![CDATA["+rs.getDouble("ADJ_AMT")+"]]>").append("</adjusted_amt>");
retTabSepStrBuff.append("<adjusted_amt>").append("<![CDATA["+rs.getDouble("ADJ_AMT")+"]]>").append("</adjusted_amt>");
//INV_AMT
//retTabSepStrBuff.append(rs.getDouble(4)).append("\t");
retTabSepStrBuff.append("<inv_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</inv_amt>");
//Added by manoj dtd 18/10/2012 to display absolute value
//CUST_NAME
//retTabSepStrBuff.append(rs.getString(5)).append("\t");
retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" +rs.getString(5) +"]]>").append("</cust_name>");
//CUST_CODE
//retTabSepStrBuff.append(rs.getString(10)).append("\t");//added by rajesh k to append cust_code
retTabSepStrBuff.append("<cust_code>").append("<![CDATA["+rs.getString(10)+"]]>").append("</cust_code>");
//BANK_CODE
//retTabSepStrBuff.append(rs.getString(6)).append("\t");
......@@ -573,21 +588,18 @@ Put a validation chq amount in filter and total of details matches in case heade
//retTabSepStrBuff.append(rs.getDouble(9)).append("\t");
retTabSepStrBuff.append("<chq_amount>").append("<![CDATA["+rs.getDouble(9)+"]]>").append("</chq_amount>");
//CUST_CODE
//retTabSepStrBuff.append(rs.getString(10)).append("\t");//added by rajesh k to append cust_code
retTabSepStrBuff.append("<cust_code>").append("<![CDATA["+rs.getString(10)+"]]>").append("</cust_code>");
//cust_ref_no
if (rs.getString("CUST_REF_NO") == null || rs.getString("CUST_REF_NO").trim().length() == 0)
//cust_ref_date
if(rs.getDate("CUST_REF_DATE") == null)
{
//retTabSepStrBuff.append("").append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[]]>").append("</cust_ref_no>");
retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA[]]>").append("</cust_ref_date>");
}
else
{
//retTabSepStrBuff.append(rs.getString("CUST_REF_NO")).append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[" +rs.getString("CUST_REF_NO") +"]]>").append("</cust_ref_no>");
}
//retTabSepStrBuff.append(rs.getDate("CUST_REF_DATE")).append("\t");
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp("CUST_REF_DATE"))).append("\t");
retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA["+sdf.format(rs.getTimestamp("CUST_REF_DATE"))+"]]>").append("</cust_ref_date>");
}
//due_date
......@@ -601,18 +613,7 @@ Put a validation chq amount in filter and total of details matches in case heade
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp("DUE_DATE"))).append("\t");
retTabSepStrBuff.append("<due_date>").append("<![CDATA[" +sdf.format(rs.getTimestamp("DUE_DATE")) +"]]>").append("</due_date>");
}
//cust_ref_date
if(rs.getDate("CUST_REF_DATE") == null)
{
//retTabSepStrBuff.append("").append("\t");
retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA[]]>").append("</cust_ref_date>");
}
else
{
//retTabSepStrBuff.append(rs.getDate("CUST_REF_DATE")).append("\t");
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp("CUST_REF_DATE"))).append("\t");
retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA["+sdf.format(rs.getTimestamp("CUST_REF_DATE"))+"]]>").append("</cust_ref_date>");
}
//reas_CODE
if (rs.getString("REAS_CODE") == null || rs.getString("REAS_CODE").trim().length() == 0)
{
......
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