Commit cdebcca6 authored by dpawar's avatar dpawar

Generate misc. debit note and new functionality added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94140 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 561cb19b
......@@ -15,20 +15,16 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.ejb.Stateless;
import javax.naming.InitialContext;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
@Stateless
public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeliveryConfLocal,ProofOfDeliveryConfRemote
......@@ -184,28 +180,25 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
detail3AmtT=detail3AmtT + detail3Amt;
mapDebitNoteAmt.put(lineNo, detail3Amt);
//detail2xmlString=getDetailsXmlString(conn, xtraParams, invoiceId, aprvRate, debitNoteAmtDetail);
detail2xmlString=detail2xmlString + getDetailsXmlString(invoiceId,lineNotrace,lineNo,PODrate,PODqty,lotNo,lotSl,itemCode, detail3Amt);
detail2xmlString=detail2xmlString + getDetailsXmlString(conn,invoiceId,lineNotrace,lineNo,aprvRate,PODqty,lotNo,lotSl,itemCode, detail3Amt);
} //end while-------------------@@@@@@@@@@---------------------------------------
} //end while
System.out.println("detail2xmlString3813---->>[["+detail2xmlString+"]]");
System.out.println("Final debitNoteAmtHdr---------->> : "+debitNoteAmtHdr);
System.out.println("Final detail3AmtT in debit note table---------->> : "+detail3AmtT);
//debitNoteAmtDetail=100.10;
System.out.println("-----Debit note generation condition----------"+actualDBamount);
errString=genDebitNote(tranId,invoiceId,custCode,siteCode,xtraParams,actualDBamount,currCode,ExchRate,detail2xmlString,debitNoteAmtHdr,detail3AmtT,conn);
errString=genDebitNote("POD",invoiceId,custCode,siteCode,xtraParams,currCode,ExchRate,detail2xmlString,detail3AmtT,conn);
System.out.println("------Error string after DN save--->>["+errString+"]");
if (errString.indexOf("Success") > -1)
{
int cnt=updateDrCrRcpHdrAmt(debitNoteTranID,detail3AmtT,conn);
if(cnt>0)
conn.commit();
{
System.out.println("Confirmation of Debit note1212112 COMMITED----------");
//MiscDrCrRcpConf confDebitNote=new MiscDrCrRcpConf();
//errString=confDebitNote.confirm(debitNoteTranID,xtraParams,"",conn);
errString = confirmDebitNote("drcrrcp_dr",debitNoteTranID,xtraParams,"",conn);
MiscDrCrRcpConf confDebitNote=new MiscDrCrRcpConf();
errString=confDebitNote.confirm(debitNoteTranID,xtraParams,"",conn);
//errString = confirmDebitNote("drcrrcp_dr",debitNoteTranID,xtraParams,"",conn);
System.out.println("Error String on DB Confirmation21212112 : "+errString);
if((errString != null ) && errString.indexOf("VTSUCC1") > -1)
if((errString != null ) && errString.indexOf("CONFSUCCES") > -1)
{
updCnt=updatePodHeader(conn,tranId,loginCode);
System.out.println("return count from updateDebitNoteAmounts--->["+updCnt+"]");
......@@ -219,13 +212,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
conn.rollback();
System.out.println("transaction not confirmed----------");
}
}
else{
}else{
errString = itmdbAccess.getErrorString("", "VTNCONFT", "", "", conn);
conn.rollback();
}
}
else{
}else{
//errString = itmdbAccess.getErrorString("", "VTNCONFT", "", "", conn);
conn.rollback();
return errString;
......@@ -300,15 +291,39 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
return errString;
}
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
public java.sql.Timestamp getInvoiceDate(Connection conn,String invID)
{
ResultSet rs=null;
PreparedStatement pstmt=null;
String sql="";
java.sql.Timestamp invDate = null;
try{
sql="select conf_date from invoice where invoice_id= ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, invID);
rs=pstmt.executeQuery();
if(rs.next()){
invDate=rs.getTimestamp(1);
}
}
catch(Exception e)
{
System.out.println("Exception in getInvoiceDate-------");
e.printStackTrace();
}
return invDate;
}
private String genDebitNote(String process,String invoiceId,String custCode,String siteCode ,String xtraParams,String currencyCode,double exchRate,String detail2xmlString,double detail3AmtT, Connection conn) throws ITMException
{
System.out.println("<--------Inside genDebitNote11----------->");
StringBuffer xmlBuff = new StringBuffer();
StringBuffer xmlBuffer = new StringBuffer();
String xmlString = "", sql="", refNo="", procCode="";
String retString="";
GenericUtility genutility=null;
SimpleDateFormat sdf=null;
String currAppdate ="";
String currAppdate ="",invoiceDate="";
java.sql.Timestamp currDate = null;
String itemSer="";
String finEntity="",acctCode="",cctrCode="",acctCodetotAR="",cctrCodetotAR="",dbTranID="";
......@@ -324,6 +339,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
currDate = new java.sql.Timestamp(System.currentTimeMillis()) ;
currAppdate = sdf.format(currDate);
java.sql.Timestamp invDate =getInvoiceDate(conn,invoiceId);
if(invDate !=null){
invoiceDate=sdf.format(invDate);
}
itemSer =getColumnDescr(conn, "item_ser","invoice","invoice_id", invoiceId);
finEntity = getColumnDescr(conn, "fin_entity","site","site_code", siteCode);
acctCode = getColumnDescr(conn,"acct_code__ar", "customer", "cust_code", custCode);
......@@ -331,102 +350,71 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
//acctCodetotAR=getColumnDescr(conn,"ACCT_CODE__TOT_AR", "item_acct_detr", "item_ser", itemSer);
//cctrCodetotAR=getColumnDescr(conn,"CCTR_CODE__TOT_AR", "item_acct_detr", "item_ser", itemSer);
cctrCodetotAR = cctrCodetotAR== null ? " " :cctrCodetotAR;
xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
xmlBuff.append("<DocumentRoot>\r\n");
xmlBuff.append("<description>").append("Datawindow Root").append("</description>\r\n");
xmlBuff.append("<group0>\r\n");
xmlBuff.append("<description>").append("Group0 description").append("</description>\r\n");
xmlBuff.append("<Header0>\r\n");
xmlBuff.append("<objName><![CDATA[").append("drcrrcp_dr").append("]]></objName>\r\n");
xmlBuff.append("<pageContext><![CDATA[").append("1").append("]]></pageContext>\r\n");
xmlBuff.append("<objContext><![CDATA[").append("1").append("]]></objContext>\r\n");
xmlBuff.append("<editFlag><![CDATA[").append("A").append("]]></editFlag>\r\n");
xmlBuff.append("<focusedColumn><![CDATA[").append("").append("]]></focusedColumn>\r\n");
xmlBuff.append("<action><![CDATA[").append("SAVE").append("]]></action>\r\n");
xmlBuff.append("<elementName><![CDATA[").append("").append("]]></elementName>\r\n");
xmlBuff.append("<keyValue><![CDATA[").append("1").append("]]></keyValue>\r\n");
xmlBuff.append("<taxKeyValue><![CDATA[").append("").append("]]></taxKeyValue>\r\n");
xmlBuff.append("<saveLevel><![CDATA[").append("1").append("]]></saveLevel>\r\n");
xmlBuff.append("<forcedSave><![CDATA[").append(true).append("]]></forcedSave>\r\n");
xmlBuff.append("<taxInFocus><![CDATA[").append(false).append("]]></taxInFocus>\r\n");
xmlBuff.append("<description>").append("Header0 members").append("</description>\r\n");
xmlBuff.append("<Detail1 dbID=\"\" domID=\"1\" objName=\"drcrrcp_dr\" objContext=\"1\">\r\n");
xmlBuff.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>\r\n");
xmlBuff.append("<tran_id/>\r\n");
xmlBuff.append("<tran_ser><![CDATA[DRNRCP]]></tran_ser>\r\n");
xmlBuff.append("<drcr_flag>").append("<![CDATA[").append("D").append("]]></drcr_flag>\r\n");
xmlBuff.append("<tran_date><![CDATA["+currAppdate +"]]></tran_date>\r\n");
xmlBuff.append("<eff_date><![CDATA["+currAppdate+"]]></eff_date>\r\n");
//xmlBuff.append("<amount><![CDATA["+ bdNoteHdr +"]]></amount>");
xmlBuff.append("<item_ser><![CDATA["+ itemSer +"]]></item_ser>\r\n");
xmlBuff.append("<site_code><![CDATA["+ siteCode +"]]></site_code>\r\n");
xmlBuff.append("<cust_code><![CDATA["+ custCode +"]]></cust_code>\r\n");
xmlBuff.append("<invoice_id><![CDATA["+ invoiceId +"]]></invoice_id>\r\n");
crTerm=getColumnDescr(conn, "cr_term","invoice","invoice_id", invoiceId);
System.out.println("crTerm---->>["+crTerm+"]");
xmlBuff.append("<cr_term><![CDATA["+ crTerm +"]]></cr_term>");
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");
xmlBuff.append("<exch_rate><![CDATA["+ exchRate +"]]></exch_rate>\r\n");
//xmlBuff.append("<round_adj><![CDATA["+ roundAdj +"]]></round_adj>");
//xmlBuff.append("<anal_code><![CDATA["+ analCode +"]]></anal_code>");
xmlBuff.append("<acct_code><![CDATA["+ acctCode +"]]></acct_code>\r\n");
xmlBuff.append("<cctr_code><![CDATA["+ cctrCode +"]]></cctr_code>\r\n");
//xmlBuff.append("<gp_no><![CDATA["+ gpNo +"]]></gp_no>");
//xmlBuff.append("<gp_date><![CDATA["+ (gpDate==null?"":sdf.format(gpDate).toString()) +"]]></gp_date>");
xmlBuff.append("</Detail1>\r\n");
xmlBuff.append(detail2xmlString);
/*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())
{
acctCode=rs.getString("ACCT_CODE__SAL");
cctrCode=rs.getString("CCTR_CODE__SAL");
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
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");
xmlBuff.append("<acct_code><![CDATA["+acctCode+"]]></acct_code>\r\n");
xmlBuff.append("<cctr_code><![CDATA["+cctrCode+"]]></cctr_code>\r\n");
xmlBuff.append("<amount><![CDATA["+debitNoteAmtHdr+"]]></amount>\r\n");
xmlBuff.append("</Detail3>");
lineNo1="2";
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");
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>");*/
xmlBuffer.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
xmlBuffer.append("<DocumentRoot>");
xmlBuffer.append("<description>").append("Datawindow Root").append("</description>");
xmlBuffer.append("<group0>");
xmlBuffer.append("<description>").append("Group0 description").append("</description>");
xmlBuffer.append("<Header0>");
xmlBuffer.append("<objName><![CDATA[").append("misc_drcr_rcp_dr").append("]]></objName>");
xmlBuffer.append("<pageContext><![CDATA[").append("1").append("]]></pageContext>");
xmlBuffer.append("<objContext><![CDATA[").append("1").append("]]></objContext>");
xmlBuffer.append("<editFlag><![CDATA[").append("A").append("]]></editFlag>");
xmlBuffer.append("<focusedColumn><![CDATA[").append("").append("]]></focusedColumn>");
xmlBuffer.append("<action><![CDATA[").append("SAVE").append("]]></action>");
xmlBuffer.append("<elementName><![CDATA[").append("").append("]]></elementName>");
xmlBuffer.append("<keyValue><![CDATA[").append("1").append("]]></keyValue>");
xmlBuffer.append("<taxKeyValue><![CDATA[").append(" ").append("]]></taxKeyValue>");
xmlBuffer.append("<saveLevel><![CDATA[").append("1").append("]]></saveLevel>");
xmlBuffer.append("<forcedSave><![CDATA[").append(true).append("]]></forcedSave>");
xmlBuffer.append("<taxInFocus><![CDATA[").append(false).append("]]></taxInFocus>");
xmlBuffer.append("<description>").append("Header0 members").append("</description>");
xmlBuffer.append("<Detail1 objContext =\"1\"").append(" objName=\"misc_drcr_rcp_dr\" domID=\"1\" dbID=\"\">");
xmlBuffer.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
xmlBuffer.append("<tran_id/>");
xmlBuffer.append("<tran_type>").append("<![CDATA[").append("HO").append("]]></tran_type>\r\n");
xmlBuffer.append("<tran_ser>").append("<![CDATA[").append("MDRCRD").append("]]></tran_ser>\r\n");
xmlBuffer.append("<tran_date>").append("<![CDATA[").append(currAppdate).append("]]></tran_date>\r\n");
xmlBuffer.append("<eff_date>").append("<![CDATA[").append(currAppdate).append("]]></eff_date>\r\n");
xmlBuffer.append("<fin_entity>").append("<![CDATA[").append(finEntity).append("]]></fin_entity>\r\n");
xmlBuffer.append("<site_code>").append("<![CDATA[").append(siteCode).append("]]></site_code>\r\n");
xmlBuffer.append("<cctr_code>").append("<![CDATA[").append(cctrCode).append("]]></cctr_code>\r\n");
xmlBuffer.append("<sundry_type>").append("<![CDATA[").append("C").append("]]></sundry_type>\r\n");
xmlBuffer.append("<sundry_code>").append("<![CDATA[").append(custCode).append("]]></sundry_code>\r\n");
xmlBuffer.append("<acct_code>").append("<![CDATA[").append(acctCode).append("]]></acct_code>\r\n");
xmlBuffer.append("<curr_code>").append("<![CDATA[" + currencyCode + "]]>").append("</curr_code>\r\n");
xmlBuffer.append("<amount>").append("<![CDATA[").append(detail3AmtT).append("]]></amount>\r\n");
xmlBuffer.append("<drcr_flag>").append("<![CDATA[").append("D").append("]]></drcr_flag>\r\n");
xmlBuffer.append("<item_ser>").append("<![CDATA[").append(itemSer).append("]]></item_ser>\r\n");
xmlBuffer.append("<exch_rate>").append("<![CDATA[").append(exchRate).append("]]></exch_rate>\r\n");
xmlBuffer.append("<confirmed>").append("<![CDATA[").append("N").append("]]></confirmed>\r\n");
xmlBuffer.append("<acct_code__tot_ar>").append("<![CDATA[").append(acctCodetotAR).append("]]></acct_code__tot_ar>\r\n");
xmlBuffer.append("<cctr_code__tot_ar>").append("<![CDATA[").append(cctrCodetotAR).append("]]></cctr_code__tot_ar>\r\n");
xmlBuffer.append("<cust_ref_no>").append("<![CDATA[").append(invoiceId).append("]]></cust_ref_no>\r\n");
xmlBuffer.append("<cust_ref_date>").append("<![CDATA[").append(invoiceDate).append("]]></cust_ref_date>\r\n");
System.out.println("Process------>>["+process+"]");
if(process.equalsIgnoreCase("PRC"))
xmlBuffer.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note from Proof of Delivery Process").append("]]></remarks>\r\n");
else
xmlBuffer.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note from Proof Of Delivery").append("]]></remarks>\r\n");
xmlBuffer.append("<chg_user/>\r\n");
xmlBuffer.append("<chg_term/>\r\n");
xmlBuffer.append("<chg_date>").append("<![CDATA[").append(currAppdate).append("]]></chg_date>\r\n");
xmlBuffer.append("</Detail1>\r\n");
System.out.println("Detail 2 xml String ---->>[[ "+detail2xmlString+" ]]");
xmlBuffer.append(detail2xmlString);
xmlBuff.append("</Header0>");
xmlBuff.append("</group0>");
xmlBuff.append("</DocumentRoot>");
xmlString=xmlBuff.toString();
xmlBuffer.append("</Header0>");
xmlBuffer.append("</group0>");
xmlBuffer.append("</DocumentRoot>");
xmlString=xmlBuffer.toString();
System.out.println("All XML String --->>[["+xmlBuff.toString()+"]]");
System.out.println("All XML String --->>[["+xmlBuffer.toString()+"]]");
System.out.println("------ debit Note Data saving------------------");
retString=saveData(siteCode, xmlString, conn);
......@@ -463,40 +451,54 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
return retString;
}
protected String getDetailsXmlString(String invoiceId, int lineNoTrace,int lineNo,double rateInv,double qtyInv,String lotNo,String lotSl,String itemCode, double debitNoteAmtDetail)
protected String getDetailsXmlString(Connection conn,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+"]");
StringBuffer detailsXml=new StringBuffer();
System.out.println("in getDetail2xmlString -->> itemCode: "+itemCode+" LineNo : "+lineNo);
StringBuffer detail2xml=new StringBuffer();
PreparedStatement pstmt1=null;
ResultSet rs1=null;
String acctCodeUDF1="",acctCodeUDF2="",sql="",itemUnit="";
try
{
sql="select UDF_STR1,UDF_STR2 from gencodes where FLD_NAME = ? AND MOD_NAME = ? AND FLD_VALUE = ? ";
pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1, "REAS_CODE");
pstmt1.setString(2, "W_MISC_DRCR_RCP_DR");
pstmt1.setString(3, "PODDBTNOTE");
rs1=pstmt1.executeQuery();
if(rs1.next())
{
acctCodeUDF1=rs1.getString(1)==null ? "" :rs1.getString(1);
acctCodeUDF2=rs1.getString(2)==null ? "" :rs1.getString(2);
}
rs1.close();rs1=null;
pstmt1.close();pstmt1=null;
System.out.println("acctCodeUDF1 : "+acctCodeUDF1+" acctCodeUDF2 : "+acctCodeUDF2);
detailsXml.append("<Detail2 dbID='' domID='"+lineNo+"' objName=\"drcrrcp_dr\" objContext=\"2\">");
detailsXml.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
detailsXml.append("<tran_id/>");
detailsXml.append("<line_no><![CDATA["+lineNo+"]]></line_no>\r\n");
detailsXml.append("<line_no__invtrace><![CDATA["+lineNoTrace+"]]></line_no__invtrace>\r\n");
detailsXml.append("<line_no__inv><![CDATA["+lineNoTrace+"]]></line_no__inv>\r\n");
detailsXml.append("<invoice_id><![CDATA["+invoiceId+"]]></invoice_id>\r\n");
detailsXml.append("<item_code><![CDATA["+itemCode+"]]></item_code>\r\n");
detailsXml.append("<rate><![CDATA["+rateInv+"]]></rate>\r\n");
detailsXml.append("<rate__std><![CDATA["+rateInv+"]]></rate__std>\r\n");
detailsXml.append("<quantity><![CDATA["+qtyInv+"]]></quantity>\r\n");
detailsXml.append("<lot_no><![CDATA["+lotNo+"]]></lot_no>\r\n");
detailsXml.append("<lot_sl><![CDATA["+lotSl+"]]></lot_sl>\r\n");
detailsXml.append("<rate__clg><![CDATA["+rateInv+"]]></rate__clg>\r\n");
//String debitNoteAmt1="100.10";
detailsXml.append("<drcr_amt><![CDATA["+debitNoteAmtDetail+"]]></drcr_amt>\r\n");
detailsXml.append("<net_amt><![CDATA["+debitNoteAmtDetail+"]]></net_amt>\r\n");
//detailsXml.append("<reas_code><![CDATA["+reasCode+"]]></reas_code>");
detailsXml.append("</Detail2>");
itemUnit =getColumnDescr(conn, "unit","item","item_code", itemCode);
System.out.println("Item Code : "+itemCode+" itemCode Unit : "+itemUnit);
detail2xml.append("<Detail2 objContext =\"2\"").append(" objName=\"misc_drcr_rcp_dr\" domID=\"1\" dbID=\"\">");
detail2xml.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
detail2xml.append("<tran_id/>");
detail2xml.append("<line_no>").append("<![CDATA[").append(lineNo).append("]]></line_no>");
detail2xml.append("<line_no__invtrace>").append("<![CDATA[").append(lineNoTrace).append("]]></line_no__invtrace>");
detail2xml.append("<net_amt>").append("<![CDATA[").append(debitNoteAmtDetail).append("]]></net_amt>");
detail2xml.append("<amount>").append("<![CDATA[").append(debitNoteAmtDetail).append("]]></amount>");
detail2xml.append("<acct_code>").append("<![CDATA[").append(acctCodeUDF1).append("]]></acct_code>");
detail2xml.append("<cctr_code>").append("<![CDATA[").append(acctCodeUDF2).append("]]></cctr_code>");
detail2xml.append("<sundry_type>").append("<![CDATA[").append("C").append("]]></sundry_type>\r\n");
detail2xml.append("<item_code>").append("<![CDATA[").append(itemCode).append("]]></item_code>\r\n");
detail2xml.append("<rate>").append("<![CDATA[").append(rateInv).append("]]></rate>\r\n");
detail2xml.append("<quantity>").append("<![CDATA[").append(qtyInv).append("]]></quantity>\r\n");
detail2xml.append("<lot_no>").append("<![CDATA[").append(lotNo).append("]]></lot_no>\r\n");
detail2xml.append("<lot_sl>").append("<![CDATA[").append(lotSl).append("]]></lot_sl>\r\n");
detail2xml.append("<unit>").append("<![CDATA[").append(itemUnit).append("]]></unit>\r\n");
detail2xml.append("</Detail2>");
return detail2xml.toString();
}
......@@ -507,8 +509,8 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
e.printStackTrace();
}
System.out.println("@@@@@2: xmlString detail2 + detail3--->>[["+detailsXml.toString()+"]]");
return detailsXml.toString();
System.out.println("@@@@@2: xmlString detail2--->>[["+detail2xml.toString()+"]]");
return detail2xml.toString();
}
private int updatePodHeader(Connection conn,String tranId,String loginCode)
{
......
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