Commit 4d717280 authored by mjadhav's avatar mjadhav

ThirdOrderParty set in order


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97074 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 47bfcd1d
......@@ -165,7 +165,7 @@ public class GenInvoiceSchedule implements Schedule {
System.out.println("site code parameter "+siteCode);
invoiceIdList.clear();
System.out.println(">>>>>>>>>>>>>>>For Invoice");
System.out.println(">>>>>>>>>>>>>>>For Invoice.....");
//pstmt = conn.prepareStatement("SELECT INVOICE_ID FROM invoice WHERE CONFIRMED='Y' AND DOWNLOAD_FLAG ='Y' AND SITE_CODE=?");
pstmt = conn.prepareStatement("SELECT INVOICE_ID FROM invoice WHERE CONFIRMED='Y' AND CASE WHEN DOWNLOAD_FLAG IS NULL THEN 'N' ELSE DOWNLOAD_FLAG END='N' AND SITE_CODE=? ");
pstmt.setString(1,siteCode);
......@@ -518,7 +518,7 @@ public class GenInvoiceSchedule implements Schedule {
thirdPartyAddInSpain.appendChild(getElementValue(doc, fileHeader, "Province","Valencia"));
thirdPartyAddInSpain.appendChild(getElementValue(doc, fileHeader, "CountryCode","ESP"));
thirdPartyEntity.appendChild(thirdPartyAddInSpain);
fileHeader.appendChild(thirdPartyEntity);
thirdParty.appendChild(thirdPartyEntity);
fileHeader.appendChild(thirdParty);
......@@ -1082,7 +1082,7 @@ public class GenInvoiceSchedule implements Schedule {
invoice.appendChild(taxesOutputs);
Element taxesWithheld = doc.createElement("TaxesWithheld");
Element taxHeld = doc.createElement("TaxesWithheld");
Element taxHeld = doc.createElement("Tax");
taxHeld.appendChild(getElementValue(doc, invoiceParent, "TaxTypeCode","01" ));
taxHeld.appendChild(getElementValue(doc, invoiceParent, "TaxRate","0.00" ));
taxHeld.appendChild(getElementValue(doc, invoiceParent, "TaxableBase", "0.00" ));
......@@ -1116,12 +1116,12 @@ public class GenInvoiceSchedule implements Schedule {
Element items = doc.createElement("Items");
Element invoiceLine = doc.createElement("InvoiceLine");
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "ItemDescription", (String) tempMap.get("item_descr" + cnt)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "Quantity", (String) tempMap.get("quantity" + cnt)));
//invoiceLine.appendChild(getElementValue(doc, invoiceParent, "UnitOfMeasure", (String) tempMap.get("unit" + cnt)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "ItemDescription", (String) tempMap.get("item_descr" + i)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "Quantity", (String) tempMap.get("quantity" + i)));
//invoiceLine.appendChild(getElementValue(doc, invoiceParent, "UnitOfMeasure", (String) tempMap.get("unit" + i)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "UnitOfMeasure", "01"));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "UnitPriceWithoutTax",(String) tempMap.get("rate" + cnt)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "TotalCost",(String) tempMap.get("net_amt" + cnt)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "UnitPriceWithoutTax",(String) tempMap.get("rate" + i)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "TotalCost",(String) tempMap.get("net_amt" + i)));
Element discountsAndRebates = doc.createElement("DiscountsAndRebates");
Element discountItem = doc.createElement("Discount");
......@@ -1130,10 +1130,10 @@ public class GenInvoiceSchedule implements Schedule {
if(!(tempMap.get("disc_amt" + cnt).equalsIgnoreCase("0.0")))
{
discountItem.appendChild(getElementValue(doc, invoiceParent, "DiscountRate", (String) tempMap.get("discount" + cnt)));
discountItem.appendChild(getElementValue(doc, invoiceParent, "DiscountRate", (String) tempMap.get("discount" + i)));
}
discountItem.appendChild(getElementValue(doc, invoiceParent, "DiscountAmount", (String) tempMap.get("disc_amt" + cnt)));
discountItem.appendChild(getElementValue(doc, invoiceParent, "DiscountAmount", (String) tempMap.get("disc_amt" + i)));
discountsAndRebates.appendChild(discountItem);
invoiceLine.appendChild(discountsAndRebates);
......@@ -1146,7 +1146,7 @@ public class GenInvoiceSchedule implements Schedule {
invoiceLine.appendChild(charges);*/
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "GrossAmount", (String) tempMap.get("net_amt" + cnt)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "GrossAmount", (String) tempMap.get("net_amt" + i)));
......@@ -1157,7 +1157,7 @@ public class GenInvoiceSchedule implements Schedule {
taxHeldItem.appendChild(getElementValue(doc, invoiceParent, "TaxRate", "0.00"));
Element taxableTotAmt = doc.createElement("TaxableBase");
taxableTotAmt.appendChild(getElementValue(doc, invoiceParent, "TotalAmount","0.00"));
taxableTotAmt.appendChild(taxesWithheldItem);
taxHeldItem.appendChild(taxableTotAmt);
taxHeldItem.appendChild(getElementValue(doc, invoiceParent, "TaxAmount", "0.00"));
taxesWithheldItem.appendChild(taxHeldItem);
invoiceLine.appendChild(taxesWithheldItem);
......@@ -1172,7 +1172,7 @@ public class GenInvoiceSchedule implements Schedule {
Element taxableTotAmtOutputs = doc.createElement("TaxableBase");
taxableTotAmtOutputs.appendChild(getElementValue(doc, invoiceParent, "TotalAmount",utilMethods.getReqDecString(taxBaseAmt,2)));
taxItem.appendChild(taxableTotAmtOutputs);
taxItem.appendChild(getElementValue(doc, invoiceParent, "TaxAmount", (String) tempMap.get("tax_amt" + cnt)));
taxItem.appendChild(getElementValue(doc, invoiceParent, "TaxAmount", (String) tempMap.get("tax_amt" + i)));
taxesOutputsItem.appendChild(taxItem);
invoiceLine.appendChild(taxesOutputsItem);
......@@ -1185,7 +1185,7 @@ public class GenInvoiceSchedule implements Schedule {
items.appendChild(invoiceLine);
invoice.appendChild(items);
}
}//end of for loop
Element paymentDetails = doc.createElement("PaymentDetails");
Element installment = doc.createElement("Installment");
......
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