Commit 68a5dfd9 authored by dpawar's avatar dpawar

remove detail3 xml


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94077 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2c1db2cd
......@@ -36,6 +36,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
String debitNoteTranID="";
boolean isRegPriceNotFound=false;
boolean isError = false;
public static ProofOfDeliveryConf getInstance()
{
return new ProofOfDeliveryConf();
}
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException
{
System.out.println("--------------confirm method of ProofOfDeliveryConf ------------- : ");
......@@ -296,7 +300,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
return errString;
}
private String genDebitNote(String tranId,String invoiceId,String custCode,String siteCode ,String xtraParams,double relAmt,String currencyCode,double exchRate,String detail2xmlString,double debitNoteAmtHdr,double detail3AmtT, Connection conn) throws ITMException
private String genDebitNote(String process,String invoiceId,String custCode,String siteCode ,String xtraParams,double relAmt,String currencyCode,double exchRate,String detail2xmlString,double debitNoteAmtHdr,double detail3AmtT, Connection conn) throws ITMException
{
System.out.println("<--------Inside genDebitNote11----------->");
StringBuffer xmlBuff = new StringBuffer();
......@@ -312,6 +316,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
PreparedStatement pstmt=null;
ResultSet rs=null;
int count=0;
try
{
genutility=GenericUtility.getInstance();
......@@ -361,7 +366,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
crTerm=getColumnDescr(conn, "cr_term","invoice","invoice_id", invoiceId);
System.out.println("crTerm---->>["+crTerm+"]");
xmlBuff.append("<cr_term><![CDATA["+ crTerm +"]]></cr_term>");
xmlBuff.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note for POD").append("]]></remarks>\r\n");
System.out.println("Process------>>["+process+"]");
if(process.equalsIgnoreCase("PRC"))
xmlBuff.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note from Proof of Delivery Process").append("]]></remarks>\r\n");
else
xmlBuff.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note from Proof Of Delivery").append("]]></remarks>\r\n");
//xmlBuff.append("<due_date><![CDATA["+ (dueDate==null?"":sdf.format(dueDate).toString()) +"]]></due_date>");
xmlBuff.append("<fin_entity><![CDATA["+ finEntity +"]]></fin_entity>\r\n");
xmlBuff.append("<curr_code><![CDATA["+ currencyCode +"]]></curr_code>\r\n");
......@@ -376,7 +385,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
xmlBuff.append(detail2xmlString);
pstmt=conn.prepareStatement("SELECT ACCT_CODE__SAL,CCTR_CODE__SAL from invoice where invoice_id=?" );
/*pstmt=conn.prepareStatement("SELECT ACCT_CODE__SAL,CCTR_CODE__SAL from invoice where invoice_id=?" );
pstmt.setString(1, invoiceId);
rs=pstmt.executeQuery();
if(rs.next())
......@@ -389,8 +398,8 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
pstmt.close();
pstmt=null;
String lineNo1="1";
xmlBuff.append("<Detail3 dbID='' domID='"+lineNo1+"' objName=\"drcrrcp_dr\" objContext=\"2\">");
String lineNo1="1"; */
/*xmlBuff.append("<Detail3 dbID='' domID='"+lineNo1+"' objName=\"drcrrcp_dr\" objContext=\"2\">");
xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuff.append("<tran_id/>");
xmlBuff.append("<line_no><![CDATA["+lineNo1+"]]></line_no>\r\n");
......@@ -407,7 +416,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
xmlBuff.append("<acct_code><![CDATA["+acctCode+"]]></acct_code>\r\n");
xmlBuff.append("<cctr_code><![CDATA["+cctrCode+"]]></cctr_code>\r\n");
xmlBuff.append("<amount><![CDATA["+(detail3AmtT - debitNoteAmtHdr)+"]]></amount>\r\n");
xmlBuff.append("</Detail3>");
xmlBuff.append("</Detail3>");*/
......@@ -454,7 +463,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
return retString;
}
private String getDetailsXmlString(String invoiceId, int lineNoTrace,int lineNo,double rateInv,double qtyInv,String lotNo,String lotSl,String itemCode, double debitNoteAmtDetail)
protected String getDetailsXmlString(String invoiceId, int lineNoTrace,int lineNo,double rateInv,double qtyInv,String lotNo,String lotSl,String itemCode, double debitNoteAmtDetail)
{
invoiceId=invoiceId==null ? "" : invoiceId.trim();
System.out.println("in getDetailsXmlString -->> invoiceId--->>["+invoiceId+"]");
......@@ -671,7 +680,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
}
private double getDebitNoteAmount (double rateInv,double qtyInv)
protected double getDebitNoteAmount (double rateInv,double qtyInv)
{
System.out.println("-------- in getDebitNoteAmount method -------------");
double debitNoteAmount=0,aprvRate=0,dbResale=0,dbAmt=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