Commit 19781402 authored by mjadhav's avatar mjadhav

reg_1,reg_2 reg_3 from cust code bill


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97119 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 19c9a515
......@@ -573,7 +573,7 @@ public class GenInvoiceSchedule implements Schedule {
String custBillAdd1="",custBillAdd2="",custBillAdd3="",custBillCity="",custBillStateCode="",custBillPin="",custBillCounty="";
String custDlvAdd1="",custDlvAdd2="",custDlvAdd3="",custDlvCity="",custDlvStateCode="",custDlvPin="",custDlvCounty="";
String custBillStatedescr="",custDlvStatedescr="";
String register_1="",register_2="",register_3="";
String custDlvreg_1="",custDlvreg_2="",custDlvreg_3="",custBillreg_1="",custBillreg_2="",custBillreg_3="",custCodereg_1="",custCodereg_2="",custCodereg_3="";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
......@@ -673,7 +673,7 @@ public class GenInvoiceSchedule implements Schedule {
sql = "select ADDR1,ADDR2,CITY,STATE_CODE,PIN,pan_no,cust_type,CUST_NAME,COUNT_CODE,CUST_CODE__BIL,TAX_REG_1 from customer where CUST_CODE=?" ;
sql = "select ADDR1,ADDR2,CITY,STATE_CODE,PIN,pan_no,cust_type,CUST_NAME,COUNT_CODE,CUST_CODE__BIL,TAX_REG_1,REGISTR_1,REGISTR_2,REGISTR_3 from customer where CUST_CODE=?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
......@@ -689,7 +689,10 @@ public class GenInvoiceSchedule implements Schedule {
custType = rs.getString("cust_type");
custName = rs.getString("CUST_NAME");
custCountrtCode = rs.getString("COUNT_CODE");
//custCodeBill = rs.getString("CUST_CODE__BIL");
//custCodereg_1 = rs.getString("REGISTR_1");
//custCodereg_2 = rs.getString("REGISTR_2");
//custCodereg_3 = rs.getString("REGISTR_3");
}
rs.close();
......@@ -699,9 +702,14 @@ public class GenInvoiceSchedule implements Schedule {
custCodeBill = custCodeBill == null ? " " : custCodeBill.trim();
custCodeDlv = custCodeDlv == null ? " " : custCodeDlv.trim();
/*custCodereg_1 = custCodereg_1 == null ? " " : custCodereg_1.trim();
custCodereg_2 = custCodereg_2 == null ? " " : custCodereg_2.trim();
custCodereg_3 = custCodereg_3 == null ? " " : custCodereg_3.trim();
*/
//select cust_name from tarodev.customer where cust_code=?
sql = "select cust_name,ADDR1,ADDR2,ADDR3,CITY,STATE_CODE,PIN,COUNT_CODE from customer where CUST_CODE=?" ;
sql = "select cust_name,ADDR1,ADDR2,ADDR3,CITY,STATE_CODE,PIN,COUNT_CODE,REGISTR_1,REGISTR_2,REGISTR_3 from customer where CUST_CODE=?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeBill);
......@@ -716,6 +724,9 @@ public class GenInvoiceSchedule implements Schedule {
custBillStateCode = rs.getString("STATE_CODE");
custBillPin = rs.getString("PIN");
custBillCounty = rs.getString("COUNT_CODE");
custBillreg_1 = rs.getString("REGISTR_1");
custBillreg_2 = rs.getString("REGISTR_2");
custBillreg_3 = rs.getString("REGISTR_3");
}
......@@ -731,9 +742,11 @@ public class GenInvoiceSchedule implements Schedule {
custBillStateCode = custBillStateCode == null ? " " : custBillStateCode.trim();
custBillPin = custBillPin == null ? " " : custBillPin.trim();
custBillCounty = custBillCounty == null ? " " : custBillCounty.trim();
custBillreg_1 = custBillreg_1 == null ? " " : custBillreg_1.trim();
custBillreg_2 = custBillreg_2 == null ? " " : custBillreg_2.trim();
custBillreg_3 = custBillreg_3 == null ? " " : custBillreg_3.trim();
sql = "select cust_name,ADDR1,ADDR2,ADDR3,CITY,STATE_CODE,PIN,COUNT_CODE,REGISTR_1,REGISTR_2,REGISTR_3 from customer where CUST_CODE=?" ;
pstmt = conn.prepareStatement(sql);
......@@ -749,9 +762,9 @@ public class GenInvoiceSchedule implements Schedule {
custDlvStateCode = rs.getString("STATE_CODE");
custDlvPin = rs.getString("PIN");
custDlvCounty = rs.getString("COUNT_CODE");
register_1 = rs.getString("REGISTR_1");
register_2 = rs.getString("REGISTR_2");
register_3 = rs.getString("REGISTR_3");
//custDlvreg_1 = rs.getString("REGISTR_1");
//custDlvreg_2 = rs.getString("REGISTR_2");
//custDlvreg_3 = rs.getString("REGISTR_3");
}
rs.close();
......@@ -766,9 +779,11 @@ public class GenInvoiceSchedule implements Schedule {
custDlvStateCode = custDlvStateCode == null ? " " : custDlvStateCode.trim();
custDlvPin = custDlvPin == null ? " " : custDlvPin.trim();
custDlvCounty = custDlvCounty == null ? " " : custDlvCounty.trim();
register_1 = register_1 == null ? " " : register_1.trim();
register_2 = register_2 == null ? " " : register_2.trim();
register_3 = register_3 == null ? " " : register_3.trim();
/*custDlvreg_1 = custDlvreg_1 == null ? " " : custDlvreg_1.trim();
custDlvreg_2 = custDlvreg_2 == null ? " " : custDlvreg_2.trim();
custDlvreg_3 = custDlvreg_3 == null ? " " : custDlvreg_3.trim();
*/
System.out.println("custNameBill :"+custNameBill);
System.out.println("custNameDlv :"+custNameDlv);
......@@ -830,7 +845,9 @@ public class GenInvoiceSchedule implements Schedule {
custNameDlv = custNameDlv == null ? " " : custNameDlv.trim();
System.out.println("custDlvreg_1:"+custDlvreg_1+"@custDlvreg_2:"+custDlvreg_2+"@custDlvreg_3:"+custDlvreg_3);
System.out.println("custBillreg_1:"+custBillreg_1+"@custBillreg_2:"+custBillreg_2+"@custBillreg_3:"+custBillreg_3);
System.out.println("custCodereg_1:"+custCodereg_1+"@custCodereg_2:"+custCodereg_2+"@custCodereg_3:"+custCodereg_3);
Element parties = doc.createElement("Parties");
......@@ -867,7 +884,7 @@ public class GenInvoiceSchedule implements Schedule {
Element administrativeCentresparent = doc.createElement("AdministrativeCentres");
Element admCustDlv = doc.createElement("AdministrativeCentre");
admCustDlv.appendChild(getElementValue(doc, parties, "CentreCode", register_1));
admCustDlv.appendChild(getElementValue(doc, parties, "CentreCode", custBillreg_1));
admCustDlv.appendChild(getElementValue(doc, parties, "RoleTypeCode", "01"));
// administrativeCentres.appendChild(getElementValue(doc, parties, "RoleTypeCode", "03"));
if(custNameDlv != "")
......@@ -886,10 +903,10 @@ public class GenInvoiceSchedule implements Schedule {
/*-------------------------------------------------------------------*/
Element admCustBill = doc.createElement("AdministrativeCentre");
if(custCodeBill != "")
{
admCustBill.appendChild(getElementValue(doc, parties, "CentreCode", register_2));
}
// if(custCodeBill != "")
// {
admCustBill.appendChild(getElementValue(doc, parties, "CentreCode", custBillreg_2));
// }
admCustBill.appendChild(getElementValue(doc, parties, "RoleTypeCode", "02"));
// administrativeCentres.appendChild(getElementValue(doc, parties, "RoleTypeCode", "03"));
if(custNameBill != "")
......@@ -909,7 +926,7 @@ public class GenInvoiceSchedule implements Schedule {
Element administrativeCentres = doc.createElement("AdministrativeCentre");
administrativeCentres.appendChild(getElementValue(doc, parties, "CentreCode", register_3));
administrativeCentres.appendChild(getElementValue(doc, parties, "CentreCode", custBillreg_3));
administrativeCentres.appendChild(getElementValue(doc, parties, "RoleTypeCode", "03"));
// administrativeCentres.appendChild(getElementValue(doc, parties, "RoleTypeCode", "03"));
if(custName != "")
......
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