| Line 288... |
Line 288... |
| 288 |
PdfPTable addressTable = new PdfPTable(1);
|
288 |
PdfPTable addressTable = new PdfPTable(1);
|
| 289 |
addressTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
289 |
addressTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
| 290 |
addressTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
|
290 |
addressTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 291 |
|
291 |
|
| 292 |
PdfPCell addressCell = getAddressCell(shippingLocation.getLocation() +
|
292 |
PdfPCell addressCell = getAddressCell(shippingLocation.getLocation() +
|
| 293 |
"\nPIN " + shippingLocation.getPincode() + "\n\n");
|
293 |
" - " + shippingLocation.getPincode() + "\nContact No.- 0120-2479977" + "\n\n");
|
| 294 |
|
294 |
|
| 295 |
PdfPTable chargesTable = new PdfPTable(1);
|
295 |
PdfPTable chargesTable = new PdfPTable(1);
|
| 296 |
chargesTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
296 |
chargesTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
| 297 |
chargesTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
|
297 |
chargesTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
|
| 298 |
if(order.isLogisticsCod()){
|
298 |
if(order.isLogisticsCod()){
|
| Line 322... |
Line 322... |
| 322 |
try {
|
322 |
try {
|
| 323 |
barcodeImage = Image.getInstance("/tmp/"+"fedex_codr_"+order.getId()+".png");
|
323 |
barcodeImage = Image.getInstance("/tmp/"+"fedex_codr_"+order.getId()+".png");
|
| 324 |
} catch (Exception e) {
|
324 |
} catch (Exception e) {
|
| 325 |
logger.error("Exception during getting Barcode Image for Fedex : ", e);
|
325 |
logger.error("Exception during getting Barcode Image for Fedex : ", e);
|
| 326 |
}
|
326 |
}
|
| 327 |
PdfPTable codReturnTable = new PdfPTable(new float[]{0.6f,0.4f});
|
- |
|
| 328 |
codReturnTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
|
- |
|
| 329 |
codReturnTable.addCell(barcodeImage);
|
327 |
PdfPCell codReturnCell= new PdfPCell(barcodeImage,false);
|
| 330 |
codReturnTable.addCell(new Phrase(" "));
|
- |
|
| 331 |
chargesTable.addCell(codReturnTable);
|
328 |
chargesTable.addCell(codReturnCell);
|
| 332 |
|
329 |
|
| 333 |
}
|
330 |
}
|
| 334 |
//End:-Added By Manish Sharma for FedEx Integration - Shipment Creation on 21-Aug-2013
|
331 |
//End:-Added By Manish Sharma for FedEx Integration - Shipment Creation on 21-Aug-2013
|
| 335 |
} else {
|
332 |
} else {
|
| 336 |
chargesTable.addCell(new Phrase("Do not pay any extra charges to the Courier."));
|
333 |
chargesTable.addCell(new Phrase("Do not pay any extra charges to the Courier."));
|
| Line 446... |
Line 443... |
| 446 |
try {
|
443 |
try {
|
| 447 |
fedexPackageBarcode = tclient.getOrderAttributeValue(order.getId(), "FedEx_Package_BarCode");
|
444 |
fedexPackageBarcode = tclient.getOrderAttributeValue(order.getId(), "FedEx_Package_BarCode");
|
| 448 |
} catch (TException e1) {
|
445 |
} catch (TException e1) {
|
| 449 |
logger.error("Error while getting the provider information.", e1);
|
446 |
logger.error("Error while getting the provider information.", e1);
|
| 450 |
}
|
447 |
}
|
| 451 |
awbNumberCell = new PdfPCell(new Paragraph(" ", helvetica6));
|
- |
|
| 452 |
}
|
448 |
|
| 453 |
awbNumberCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
- |
|
| 454 |
awbNumberCell.setBorder(Rectangle.NO_BORDER);
|
- |
|
| 455 |
|
- |
|
| 456 |
providerInfoTable.addCell(providerNameCell);
|
- |
|
| 457 |
if(formIdCell != null){
|
- |
|
| 458 |
providerInfoTable.addCell(formIdCell);
|
- |
|
| 459 |
}
|
- |
|
| 460 |
//End:-Added By Manish Sharma for FedEx Integration - Shipment Creation on 21-Aug-2013
|
- |
|
| 461 |
if(order.getLogistics_provider_id()==7L){
|
- |
|
| 462 |
generateBarcode(fedexPackageBarcode, "fedex_"+order.getId());
|
449 |
generateBarcode(fedexPackageBarcode, "fedex_"+order.getId());
|
| 463 |
|
450 |
|
| 464 |
Image barcodeImage=null;
|
451 |
Image barcodeImage=null;
|
| 465 |
try {
|
452 |
try {
|
| 466 |
barcodeImage = Image.getInstance("/tmp/"+"fedex_"+order.getId()+".png");
|
453 |
barcodeImage = Image.getInstance("/tmp/"+"fedex_"+order.getId()+".png");
|
| 467 |
} catch (Exception e) {
|
454 |
} catch (Exception e) {
|
| 468 |
logger.error("Exception during getting Barcode Image for Fedex : ", e);
|
455 |
logger.error("Exception during getting Barcode Image for Fedex : ", e);
|
| 469 |
}
|
456 |
}
|
| - |
|
457 |
|
| - |
|
458 |
awbNumberCell = new PdfPCell(barcodeImage,false);
|
| - |
|
459 |
}
|
| - |
|
460 |
awbNumberCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
| - |
|
461 |
awbNumberCell.setBorder(Rectangle.NO_BORDER);
|
| - |
|
462 |
|
| - |
|
463 |
providerInfoTable.addCell(providerNameCell);
|
| - |
|
464 |
if(formIdCell != null){
|
| 470 |
providerInfoTable.addCell(barcodeImage);
|
465 |
providerInfoTable.addCell(formIdCell);
|
| 471 |
}
|
466 |
}
|
| - |
|
467 |
//End:-Added By Manish Sharma for FedEx Integration - Shipment Creation on 21-Aug-2013
|
| - |
|
468 |
|
| 472 |
providerInfoTable.addCell(awbNumberCell);
|
469 |
providerInfoTable.addCell(awbNumberCell);
|
| 473 |
Warehouse warehouse = null;
|
470 |
Warehouse warehouse = null;
|
| 474 |
try{
|
471 |
try{
|
| 475 |
InventoryClient isc = new InventoryClient();
|
472 |
InventoryClient isc = new InventoryClient();
|
| 476 |
warehouse = isc.getClient().getWarehouse(order.getWarehouse_id());
|
473 |
warehouse = isc.getClient().getWarehouse(order.getWarehouse_id());
|
| Line 602... |
Line 599... |
| 602 |
}
|
599 |
}
|
| 603 |
PdfPCell retailInvoiceTitleCell = new PdfPCell(phrase);
|
600 |
PdfPCell retailInvoiceTitleCell = new PdfPCell(phrase);
|
| 604 |
retailInvoiceTitleCell.setHorizontalAlignment(Element.ALIGN_CENTER);
|
601 |
retailInvoiceTitleCell.setHorizontalAlignment(Element.ALIGN_CENTER);
|
| 605 |
retailInvoiceTitleCell.setBorder(Rectangle.NO_BORDER);
|
602 |
retailInvoiceTitleCell.setBorder(Rectangle.NO_BORDER);
|
| 606 |
|
603 |
|
| 607 |
Paragraph sorlAddress = new Paragraph(ourAddress + "\nTIN NO. " + tinNo, new Font(FontFamily.TIMES_ROMAN, 8f, Element.ALIGN_CENTER));
|
604 |
Paragraph sorlAddress = new Paragraph(ourAddress + "\n Contact No.- 0120-2479977" + "\nTIN NO. " + tinNo, new Font(FontFamily.TIMES_ROMAN, 8f, Element.ALIGN_CENTER));
|
| 608 |
PdfPCell sorlAddressCell = new PdfPCell(sorlAddress);
|
605 |
PdfPCell sorlAddressCell = new PdfPCell(sorlAddress);
|
| 609 |
sorlAddressCell.addElement(sorlAddress);
|
606 |
sorlAddressCell.addElement(sorlAddress);
|
| 610 |
sorlAddressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
607 |
sorlAddressCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
| 611 |
|
608 |
|
| 612 |
PdfPTable customerAddress = getCustomerAddressTable(order, null, true, helvetica8, true);
|
609 |
PdfPTable customerAddress = getCustomerAddressTable(order, null, true, helvetica8, true);
|