Commit 4115d2d1 authored by mjadhav's avatar mjadhav

add cust bill name for corporator name in legalEntity


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97108 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f9398543
......@@ -78,6 +78,7 @@ public class GenInvoiceSchedule implements Schedule {
private String invLocFilePath="";
private String invBackupFilePath="";
private String invPort="";
......@@ -339,6 +340,7 @@ public class GenInvoiceSchedule implements Schedule {
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
try
{
System.out.println("===generateInvoiceXML====");
/* DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
......@@ -386,6 +388,9 @@ public class GenInvoiceSchedule implements Schedule {
mainRootElement.setAttribute("xmlns:xs", "http://www.w3.org/2001/XMLSchema");
mainRootElement.setAttribute("xmlns:ds", "http://www.w3.org/2000/09/xmldsig#");
document.appendChild(mainRootElement);
// append child elements to root element
......@@ -564,7 +569,7 @@ public class GenInvoiceSchedule implements Schedule {
String siteAreaCode="",siteAdd1="",siteAdd2="",sitecity="",sitePin="",siteStateCode="",siteRegNo="",siteContactPersion="";
String custAdd1="",custAdd2="",custCity="",custState="",custPin="",custTaxreg="",custType="",custName="",custCountrtCode="";
String rate="",unitRate="",discountInv="",siteDescr="",custCodeBill="",custCodeDlv="";
String dlvAdd1="",dlvAdd2="",dlvCity="",dlvPin="",dlvCountryCode="",siteStatedescr="",custStatedescr="";
String dlvAdd1="",dlvAdd2="",dlvCity="",dlvPin="",dlvCountryCode="",siteStatedescr="",custStatedescr="",custNameBill="";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
......@@ -624,9 +629,6 @@ public class GenInvoiceSchedule implements Schedule {
sql = "select reg_no from siteregno where site_code=? and REF_CODE='TAXNO' " ;
pstmt = conn.prepareStatement(sql);
......@@ -658,7 +660,6 @@ public class GenInvoiceSchedule implements Schedule {
siteStateCode=rs.getString("STATE_CODE");
siteContactPersion=rs.getString("CONTACT_PERSON");
siteDescr=rs.getString("DESCR");
}
rs.close();
......@@ -692,6 +693,27 @@ public class GenInvoiceSchedule implements Schedule {
pstmt.close();
pstmt = null;
custCodeBill = custCodeBill == null ? " " : custCodeBill.trim();
//select cust_name from tarodev.customer where cust_code=?
sql = "select cust_name from customer where CUST_CODE=?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeBill);
rs = pstmt.executeQuery();
if (rs.next())
{
custNameBill = rs.getString("CUST_NAME");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
siteStatedescr=getStateDescr(conn,siteStateCode);
System.out.println("siteStatedescr "+siteStatedescr);
......@@ -737,6 +759,7 @@ public class GenInvoiceSchedule implements Schedule {
custCodeBill = custCodeBill == null ? " " : custCodeBill.trim();
siteStatedescr = siteStatedescr == null ? " " : siteStatedescr.trim();
custStatedescr = custStatedescr == null ? " " : custStatedescr.trim();
custNameBill = custNameBill == null ? " " : custNameBill.trim();
......@@ -841,7 +864,7 @@ public class GenInvoiceSchedule implements Schedule {
/*------------------------------------------------------------------*/
Element legalEntity = doc.createElement("LegalEntity");
legalEntity.appendChild(getElementValue(doc, parties, "CorporateName", siteDescr));
legalEntity.appendChild(getElementValue(doc, parties, "CorporateName", custNameBill));
//legalEntity.appendChild(getElementValue(doc, parties, "TradeName", ""));
Element addlegalEntity = doc.createElement("AddressInSpain");
/*addlegalEntity.appendChild(getElementValue(doc, parties, "Address",siteAdd1));
......
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