Subversion Repositories SmartDukaan

Rev

Rev 8876 | Rev 8996 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8876 Rev 8989
Line 835... Line 835...
835
			snapdealReferenceBarCodeCell.setColspan(2);
835
			snapdealReferenceBarCodeCell.setColspan(2);
836
			//orderTable.addCell(new Phrase("Snapdeal ReferenceCode:", helvetica8));
836
			//orderTable.addCell(new Phrase("Snapdeal ReferenceCode:", helvetica8));
837
			orderTable.addCell(snapdealReferenceBarCodeCell);
837
			orderTable.addCell(snapdealReferenceBarCodeCell);
838
			//orderTable.addCell(new Phrase(snapdealOrder.getReferenceCode(), helvetica8));
838
			//orderTable.addCell(new Phrase(snapdealOrder.getReferenceCode(), helvetica8));
839
		}
839
		}
-
 
840
		else if(order.getSource() == OrderSource.FLIPKART.getValue()){
-
 
841
			FlipkartOrder flipkartOrder = null;
-
 
842
			try {
-
 
843
				flipkartOrder = tsc.getClient().getFlipkartOrder(order.getId());
-
 
844
			} catch (TException e) {
-
 
845
				logger.error("Error while getting snapdeal order", e);
-
 
846
			}
-
 
847
			orderTable.addCell(new Phrase("Flipkart OrderId:", helvetica8));
-
 
848
			orderTable.addCell(new Phrase(flipkartOrder.getFlipkartOrderId(), helvetica8));
-
 
849
			
-
 
850
			String refernceCodeFontPath = InvoiceGenerationService.class.getResource("/saholic-wn.TTF").getPath();
-
 
851
			FontFactoryImp ttfFontFactory = new FontFactoryImp();
-
 
852
			ttfFontFactory.register(refernceCodeFontPath, "barcode");
-
 
853
			Font referenceCodeBarCodeFont = ttfFontFactory.getFont("barcode", BaseFont.CP1252, true, 20);
-
 
854
 
-
 
855
			PdfPCell snapdealReferenceBarCodeCell = new PdfPCell(new Paragraph("*" +  flipkartOrder.getFlipkartSubOrderId() + "*", referenceCodeBarCodeFont));
-
 
856
			snapdealReferenceBarCodeCell.setBorder(Rectangle.NO_BORDER);
-
 
857
			snapdealReferenceBarCodeCell.setPaddingTop(9.0f);
-
 
858
			snapdealReferenceBarCodeCell.setColspan(2);
-
 
859
			//orderTable.addCell(new Phrase("Snapdeal ReferenceCode:", helvetica8));
-
 
860
			orderTable.addCell(snapdealReferenceBarCodeCell);
-
 
861
			//orderTable.addCell(new Phrase(snapdealOrder.getReferenceCode(), helvetica8));
-
 
862
		}
-
 
863
 
840
 
864
 
841
		orderTable.addCell(new Phrase("Order Date:", helvetica8));
865
		orderTable.addCell(new Phrase("Order Date:", helvetica8));
842
		orderTable.addCell(new Phrase(DateFormat.getDateInstance(DateFormat.MEDIUM).format(new Date(order.getCreated_timestamp())), helvetica8));
866
		orderTable.addCell(new Phrase(DateFormat.getDateInstance(DateFormat.MEDIUM).format(new Date(order.getCreated_timestamp())), helvetica8));
843
 
867
 
844
		orderTable.addCell(new Phrase("Courier:", helvetica8));
868
		orderTable.addCell(new Phrase("Courier:", helvetica8));