Commit 507e6f1b authored by mjadhav's avatar mjadhav

invoiceheader line repated for item


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97076 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9a213756
......@@ -1071,10 +1071,12 @@ public class GenInvoiceSchedule implements Schedule {
tax.appendChild(getElementValue(doc, invoiceParent, "TaxTypeCode", "01"));
System.out.println("test 000");
tax.appendChild(getElementValue(doc, invoiceParent, "TaxRate", utilMethods.getReqDecString(taxPersc,2)));
tax.appendChild(getElementValue(doc, invoiceParent, "TaxableBase",utilMethods.getReqDecString(taxBaseAmt,2)));
Element taxableTotAmtHD = doc.createElement("TaxableBase");
taxableTotAmtHD.appendChild(getElementValue(doc, invoiceParent, "TotalAmount",utilMethods.getReqDecString(taxBaseAmt,2)));
tax.appendChild(taxableTotAmtHD);
//tax.appendChild(getElementValue(doc, invoiceParent, "TaxableBase",utilMethods.getReqDecString(taxBaseAmt,2)));
tax.appendChild(getElementValue(doc, invoiceParent, "TaxAmount",utilMethods.getReqDecString(taxAmt,2)));
//tax.appendChild(getElementValue(doc, invoiceParent, "EquivalenceSurcharge", ""));
Element equivalenceSurcharge = doc.createElement("EquivalenceSurcharge");
equivalenceSurcharge.appendChild(getElementValue(doc, invoiceParent, "EquivalenceSurchargeAmount", "0.00"));
tax.appendChild(equivalenceSurcharge);
......@@ -1085,7 +1087,10 @@ public class GenInvoiceSchedule implements Schedule {
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" ));
Element TaxableBaseHD = doc.createElement("TaxableBase");
TaxableBaseHD.appendChild(getElementValue(doc, invoiceParent, "TaxAmount","0.00"));
taxHeld.appendChild(TaxableBaseHD);
//taxHeld.appendChild(getElementValue(doc, invoiceParent, "TaxableBase", "0.00" ));
taxHeld.appendChild(getElementValue(doc, invoiceParent, "TaxAmount","0.00"));
taxesWithheld.appendChild(taxHeld);
invoice.appendChild(taxesWithheld);
......@@ -1109,12 +1114,25 @@ public class GenInvoiceSchedule implements Schedule {
invoiceTotals.appendChild(getElementValue(doc, invoiceParent, "TotalExecutableAmount",utilMethods.getReqDecString(NetAmtHd,2)));
invoice.appendChild(invoiceTotals);
System.out.println("cnt !!!!!! "+cnt);
Element items = doc.createElement("Items");
for(int i = 1; i<= cnt ; i++)
{
//
System.out.println("inside for loop for details!!!");
System.out.println("ItemDescription :"+i+": "+(String) tempMap.get("item_descr" + i));
System.out.println("quantity :"+i+": "+(String) tempMap.get("quantity" + i));
System.out.println("rate :"+i+": "+(String) tempMap.get("rate" + i));
System.out.println("net_amt :"+i+": "+(String) tempMap.get("net_amt" + i));
System.out.println("discount :"+i+": "+(String) tempMap.get("discount" + i));
System.out.println("disc_amt :"+i+": "+(String) tempMap.get("disc_amt" + i));
System.out.println("TaxRate :"+i+": "+utilMethods.getReqDecString(taxPersc,2));
System.out.println("TaxableBase :"+i+": "+utilMethods.getReqDecString(taxBaseAmt,2));
System.out.println("TaxAmount :"+i+": "+(String) tempMap.get("tax_amt" + i));
Element items = doc.createElement("Items");
Element invoiceLine = doc.createElement("InvoiceLine");
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "ItemDescription", (String) tempMap.get("item_descr" + i)));
invoiceLine.appendChild(getElementValue(doc, invoiceParent, "Quantity", (String) tempMap.get("quantity" + i)));
......@@ -1183,14 +1201,16 @@ public class GenInvoiceSchedule implements Schedule {
items.appendChild(invoiceLine);
invoice.appendChild(items);
//
}//end of for loop
invoice.appendChild(items);
System.out.println("===PaymentDetails====");
Element paymentDetails = doc.createElement("PaymentDetails");
Element installment = doc.createElement("Installment");
installment.appendChild(getElementValue(doc, invoiceParent, "InstallmentDueDate", sdf.format(invoiceDtHd)));
installment.appendChild(getElementValue(doc, invoiceParent, "InstallmentAmount", (String) tempMap.get("net_amt1")));
installment.appendChild(getElementValue(doc, invoiceParent, "InstallmentAmount",String.valueOf( NetAmtHd)));
installment.appendChild(getElementValue(doc, invoiceParent, "PaymentMeans", "04"));
Element accountToBeCredited = doc.createElement("AccountToBeCredited");
accountToBeCredited.appendChild(getElementValue(doc, invoiceParent, "IBAN",accToBeCredited.replaceAll("-","")));
......
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