| Line 339... |
Line 339... |
| 339 |
|
339 |
|
| 340 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
|
340 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
|
| 341 |
if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty()
|
341 |
if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty()
|
| 342 |
|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
342 |
|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
| 343 |
if(withBill){
|
343 |
if(withBill){
|
| 344 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, sellerInfo.getOrganisationName() + "\n"+ addressInfo.getAddress() + "-" + addressInfo.getPin() , sellerInfo.getTin(), invoiceFormat);
|
344 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, sellerInfo.getOrganisationName() + "\n"+ addressInfo.getAddress() + "-" + addressInfo.getPin() , sellerInfo.getTin(), invoiceFormat, addressInfo.getContact_number());
|
| 345 |
taxTable.setSpacingBefore(5.0f);
|
345 |
taxTable.setSpacingBefore(5.0f);
|
| 346 |
taxTable.setWidthPercentage(90.0f);
|
346 |
taxTable.setWidthPercentage(90.0f);
|
| 347 |
document.add(new DottedLineSeparator());
|
347 |
document.add(new DottedLineSeparator());
|
| 348 |
document.add(taxTable);
|
348 |
document.add(taxTable);
|
| 349 |
}else{
|
349 |
}else{
|
| Line 356... |
Line 356... |
| 356 |
} else {
|
356 |
} else {
|
| 357 |
document.newPage();
|
357 |
document.newPage();
|
| 358 |
}
|
358 |
}
|
| 359 |
} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
|
359 |
} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
|
| 360 |
if(withBill){
|
360 |
if(withBill){
|
| 361 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, sellerInfo.getOrganisationName() + "\n" + addressInfo.getAddress() + "-" + addressInfo.getPin() , sellerInfo.getTin(), invoiceFormat);
|
361 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, sellerInfo.getOrganisationName() + "\n" + addressInfo.getAddress() + "-" + addressInfo.getPin() , sellerInfo.getTin(), invoiceFormat, addressInfo.getContact_number());
|
| 362 |
taxTable.setSpacingBefore(5.0f);
|
362 |
taxTable.setSpacingBefore(5.0f);
|
| 363 |
taxTable.setWidthPercentage(90.0f);
|
363 |
taxTable.setWidthPercentage(90.0f);
|
| 364 |
document.add(new DottedLineSeparator());
|
364 |
document.add(new DottedLineSeparator());
|
| 365 |
document.add(taxTable);
|
365 |
document.add(taxTable);
|
| 366 |
}else{
|
366 |
}else{
|
| Line 370... |
Line 370... |
| 370 |
document.add(new DottedLineSeparator());
|
370 |
document.add(new DottedLineSeparator());
|
| 371 |
document.add(extraInfoTable);
|
371 |
document.add(extraInfoTable);
|
| 372 |
}
|
372 |
}
|
| 373 |
}
|
373 |
}
|
| 374 |
if(withBill){
|
374 |
if(withBill){
|
| 375 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, sellerInfo.getOrganisationName() + "\n" + addressInfo.getAddress() + "-" + addressInfo.getPin() , this.sellerInfo.getTin(), invoiceFormat);
|
375 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, sellerInfo.getOrganisationName() + "\n" + addressInfo.getAddress() + "-" + addressInfo.getPin() , this.sellerInfo.getTin(), invoiceFormat, addressInfo.getContact_number());
|
| 376 |
taxTable.setSpacingBefore(5.0f);
|
376 |
taxTable.setSpacingBefore(5.0f);
|
| 377 |
taxTable.setWidthPercentage(90.0f);
|
377 |
taxTable.setWidthPercentage(90.0f);
|
| 378 |
document.add(new DottedLineSeparator());
|
378 |
document.add(new DottedLineSeparator());
|
| 379 |
document.add(taxTable);
|
379 |
document.add(taxTable);
|
| 380 |
if(order.getSource() == OrderSource.FLIPKART.getValue()) {
|
380 |
if(order.getSource() == OrderSource.FLIPKART.getValue()) {
|
| Line 525... |
Line 525... |
| 525 |
|
525 |
|
| 526 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
|
526 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
|
| 527 |
if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty()
|
527 |
if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty()
|
| 528 |
|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
528 |
|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
| 529 |
if(withBill){
|
529 |
if(withBill){
|
| 530 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
|
530 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat, addressInfo.getContact_number());
|
| 531 |
taxTable.setSpacingBefore(5.0f);
|
531 |
taxTable.setSpacingBefore(5.0f);
|
| 532 |
taxTable.setWidthPercentage(90.0f);
|
532 |
taxTable.setWidthPercentage(90.0f);
|
| 533 |
document.add(new DottedLineSeparator());
|
533 |
document.add(new DottedLineSeparator());
|
| 534 |
document.add(taxTable);
|
534 |
document.add(taxTable);
|
| 535 |
}else{
|
535 |
}else{
|
| Line 542... |
Line 542... |
| 542 |
} else {
|
542 |
} else {
|
| 543 |
document.newPage();
|
543 |
document.newPage();
|
| 544 |
}
|
544 |
}
|
| 545 |
} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
|
545 |
} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
|
| 546 |
if(withBill){
|
546 |
if(withBill){
|
| 547 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
|
547 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat, addressInfo.getContact_number());
|
| 548 |
taxTable.setSpacingBefore(5.0f);
|
548 |
taxTable.setSpacingBefore(5.0f);
|
| 549 |
taxTable.setWidthPercentage(90.0f);
|
549 |
taxTable.setWidthPercentage(90.0f);
|
| 550 |
document.add(new DottedLineSeparator());
|
550 |
document.add(new DottedLineSeparator());
|
| 551 |
document.add(taxTable);
|
551 |
document.add(taxTable);
|
| 552 |
}else{
|
552 |
}else{
|
| Line 556... |
Line 556... |
| 556 |
document.add(new DottedLineSeparator());
|
556 |
document.add(new DottedLineSeparator());
|
| 557 |
document.add(extraInfoTable);
|
557 |
document.add(extraInfoTable);
|
| 558 |
}
|
558 |
}
|
| 559 |
}
|
559 |
}
|
| 560 |
if(withBill){
|
560 |
if(withBill){
|
| 561 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
|
561 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat, addressInfo.getContact_number());
|
| 562 |
taxTable.setSpacingBefore(5.0f);
|
562 |
taxTable.setSpacingBefore(5.0f);
|
| 563 |
taxTable.setWidthPercentage(90.0f);
|
563 |
taxTable.setWidthPercentage(90.0f);
|
| 564 |
document.add(new DottedLineSeparator());
|
564 |
document.add(new DottedLineSeparator());
|
| 565 |
document.add(taxTable);
|
565 |
document.add(taxTable);
|
| 566 |
if(order.getSource() == OrderSource.FLIPKART.getValue()) {
|
566 |
if(order.getSource() == OrderSource.FLIPKART.getValue()) {
|
| Line 797... |
Line 797... |
| 797 |
PdfPTable addressTable = new PdfPTable(1);
|
797 |
PdfPTable addressTable = new PdfPTable(1);
|
| 798 |
addressTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
798 |
addressTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
| 799 |
addressTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
|
799 |
addressTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 800 |
|
800 |
|
| 801 |
PdfPCell addressCell = getAddressCell(sellerInfo.getOrganisationName() + "\n" + addressInfo.getAddress() +
|
801 |
PdfPCell addressCell = getAddressCell(sellerInfo.getOrganisationName() + "\n" + addressInfo.getAddress() +
|
| 802 |
" - " + addressInfo.getPin() + "\nContact No.- +91-9818116289" + "\n\n");
|
802 |
" - " + addressInfo.getPin() + "\nContact No.- +91-"+addressInfo.getContact_number() + "\n\n");
|
| 803 |
|
803 |
|
| 804 |
PdfPTable chargesTable = new PdfPTable(1);
|
804 |
PdfPTable chargesTable = new PdfPTable(1);
|
| 805 |
chargesTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
805 |
chargesTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
| 806 |
chargesTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
|
806 |
chargesTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
|
| 807 |
if(order.isLogisticsCod()){
|
807 |
if(order.isLogisticsCod()){
|
| Line 1217... |
Line 1217... |
| 1217 |
addressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
1217 |
addressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 1218 |
addressCell.setBorder(Rectangle.NO_BORDER);
|
1218 |
addressCell.setBorder(Rectangle.NO_BORDER);
|
| 1219 |
return addressCell;
|
1219 |
return addressCell;
|
| 1220 |
}
|
1220 |
}
|
| 1221 |
|
1221 |
|
| 1222 |
private PdfPTable getTaxCumRetailInvoiceTable(List<Order> orderList, Provider provider, String ourAddress, String tinNo, String invoiceFormat){
|
1222 |
private PdfPTable getTaxCumRetailInvoiceTable(List<Order> orderList, Provider provider, String ourAddress, String tinNo, String invoiceFormat, String contact_number){
|
| 1223 |
Order order = orderList.get(0);
|
1223 |
Order order = orderList.get(0);
|
| 1224 |
PdfPTable taxTable = new PdfPTable(1);
|
1224 |
PdfPTable taxTable = new PdfPTable(1);
|
| 1225 |
Phrase phrase = null;
|
1225 |
Phrase phrase = null;
|
| 1226 |
taxTable.setSplitLate(false);
|
1226 |
taxTable.setSplitLate(false);
|
| 1227 |
taxTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
1227 |
taxTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
| Line 1234... |
Line 1234... |
| 1234 |
|
1234 |
|
| 1235 |
PdfPTable logoTable = new PdfPTable(2);
|
1235 |
PdfPTable logoTable = new PdfPTable(2);
|
| 1236 |
addLogoTable(logoTable,order);
|
1236 |
addLogoTable(logoTable,order);
|
| 1237 |
|
1237 |
|
| 1238 |
|
1238 |
|
| 1239 |
Paragraph sorlAddress = new Paragraph(ourAddress + "\n Contact No.- +91-9818116289" + "\nTIN NO. " + tinNo, new Font(FontFamily.TIMES_ROMAN, 8f, Element.ALIGN_CENTER));
|
1239 |
Paragraph sorlAddress = new Paragraph(ourAddress + "\n Contact No.- +91-"+contact_number + "\nTIN NO. " + tinNo, new Font(FontFamily.TIMES_ROMAN, 8f, Element.ALIGN_CENTER));
|
| 1240 |
PdfPCell sorlAddressCell = new PdfPCell(sorlAddress);
|
1240 |
PdfPCell sorlAddressCell = new PdfPCell(sorlAddress);
|
| 1241 |
sorlAddressCell.addElement(sorlAddress);
|
1241 |
sorlAddressCell.addElement(sorlAddress);
|
| 1242 |
sorlAddressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
1242 |
sorlAddressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 1243 |
|
1243 |
|
| 1244 |
|
1244 |
|
| Line 1278... |
Line 1278... |
| 1278 |
disclaimerCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
1278 |
disclaimerCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 1279 |
disclaimerCell.setBorder(Rectangle.NO_BORDER);
|
1279 |
disclaimerCell.setBorder(Rectangle.NO_BORDER);
|
| 1280 |
PdfPCell regAddressCell = new PdfPCell(new Phrase(sellerInfo.getOrganisationName() + "\n" +
|
1280 |
PdfPCell regAddressCell = new PdfPCell(new Phrase(sellerInfo.getOrganisationName() + "\n" +
|
| 1281 |
"Regd. Add. " + sellerInfo.getRegisteredAddress() + "\n" +
|
1281 |
"Regd. Add. " + sellerInfo.getRegisteredAddress() + "\n" +
|
| 1282 |
(StringUtils.isEmpty(sellerInfo.getCinNumber())? "" :"CIN: " + sellerInfo.getCinNumber() + "\n") +
|
1282 |
(StringUtils.isEmpty(sellerInfo.getCinNumber())? "" :"CIN: " + sellerInfo.getCinNumber() + "\n") +
|
| 1283 |
"Tel. No. +91-9818116289 E-mail. help@saholic.com Website. www.saholic.com", helvetica6));
|
1283 |
"Tel. No. +91-"+contact_number+" E-mail. help@saholic.com Website. www.saholic.com", helvetica6));
|
| 1284 |
regAddressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
1284 |
regAddressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 1285 |
regAddressCell.setBorder(Rectangle.NO_BORDER);
|
1285 |
regAddressCell.setBorder(Rectangle.NO_BORDER);
|
| 1286 |
/*SPICE ONLINE RETAIL PRIVATE LIMITED
|
1286 |
/*SPICE ONLINE RETAIL PRIVATE LIMITED
|
| 1287 |
Regd. Add. 60-D, STREET NO. C-5, SAINIK FARMS,NEW DELHI-110062
|
1287 |
Regd. Add. 60-D, STREET NO. C-5, SAINIK FARMS,NEW DELHI-110062
|
| 1288 |
CIN: U74140DL2008PTC183856
|
1288 |
CIN: U74140DL2008PTC183856
|