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 ...@@ -36,6 +36,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
String debitNoteTranID=""; String debitNoteTranID="";
boolean isRegPriceNotFound=false; boolean isRegPriceNotFound=false;
boolean isError = false; boolean isError = false;
public static ProofOfDeliveryConf getInstance()
{
return new ProofOfDeliveryConf();
}
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException
{ {
System.out.println("--------------confirm method of ProofOfDeliveryConf ------------- : "); System.out.println("--------------confirm method of ProofOfDeliveryConf ------------- : ");
...@@ -296,7 +300,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -296,7 +300,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
return errString; 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----------->"); System.out.println("<--------Inside genDebitNote11----------->");
StringBuffer xmlBuff = new StringBuffer(); StringBuffer xmlBuff = new StringBuffer();
...@@ -312,6 +316,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -312,6 +316,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
PreparedStatement pstmt=null; PreparedStatement pstmt=null;
ResultSet rs=null; ResultSet rs=null;
int count=0; int count=0;
try try
{ {
genutility=GenericUtility.getInstance(); genutility=GenericUtility.getInstance();
...@@ -361,7 +366,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -361,7 +366,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
crTerm=getColumnDescr(conn, "cr_term","invoice","invoice_id", invoiceId); crTerm=getColumnDescr(conn, "cr_term","invoice","invoice_id", invoiceId);
System.out.println("crTerm---->>["+crTerm+"]"); System.out.println("crTerm---->>["+crTerm+"]");
xmlBuff.append("<cr_term><![CDATA["+ crTerm +"]]></cr_term>"); 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("<due_date><![CDATA["+ (dueDate==null?"":sdf.format(dueDate).toString()) +"]]></due_date>");
xmlBuff.append("<fin_entity><![CDATA["+ finEntity +"]]></fin_entity>\r\n"); xmlBuff.append("<fin_entity><![CDATA["+ finEntity +"]]></fin_entity>\r\n");
xmlBuff.append("<curr_code><![CDATA["+ currencyCode +"]]></curr_code>\r\n"); xmlBuff.append("<curr_code><![CDATA["+ currencyCode +"]]></curr_code>\r\n");
...@@ -376,7 +385,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -376,7 +385,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
xmlBuff.append(detail2xmlString); 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); pstmt.setString(1, invoiceId);
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
if(rs.next()) if(rs.next())
...@@ -389,8 +398,8 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -389,8 +398,8 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
String lineNo1="1"; String lineNo1="1"; */
xmlBuff.append("<Detail3 dbID='' domID='"+lineNo1+"' objName=\"drcrrcp_dr\" objContext=\"2\">"); /*xmlBuff.append("<Detail3 dbID='' domID='"+lineNo1+"' objName=\"drcrrcp_dr\" objContext=\"2\">");
xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />"); xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuff.append("<tran_id/>"); xmlBuff.append("<tran_id/>");
xmlBuff.append("<line_no><![CDATA["+lineNo1+"]]></line_no>\r\n"); xmlBuff.append("<line_no><![CDATA["+lineNo1+"]]></line_no>\r\n");
...@@ -407,7 +416,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -407,7 +416,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
xmlBuff.append("<acct_code><![CDATA["+acctCode+"]]></acct_code>\r\n"); xmlBuff.append("<acct_code><![CDATA["+acctCode+"]]></acct_code>\r\n");
xmlBuff.append("<cctr_code><![CDATA["+cctrCode+"]]></cctr_code>\r\n"); xmlBuff.append("<cctr_code><![CDATA["+cctrCode+"]]></cctr_code>\r\n");
xmlBuff.append("<amount><![CDATA["+(detail3AmtT - debitNoteAmtHdr)+"]]></amount>\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 ...@@ -454,7 +463,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
return retString; 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(); invoiceId=invoiceId==null ? "" : invoiceId.trim();
System.out.println("in getDetailsXmlString -->> invoiceId--->>["+invoiceId+"]"); System.out.println("in getDetailsXmlString -->> invoiceId--->>["+invoiceId+"]");
...@@ -671,7 +680,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -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 -------------"); System.out.println("-------- in getDebitNoteAmount method -------------");
double debitNoteAmount=0,aprvRate=0,dbResale=0,dbAmt=0; 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