Subversion Repositories SmartDukaan

Rev

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

Rev 7528 Rev 7556
Line 323... Line 323...
323
		logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
323
		logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
324
		
324
		
325
		PdfPCell logoCell;
325
		PdfPCell logoCell;
326
		String logoPath;
326
		String logoPath;
327
		
327
		
328
		if(order.getSource() == OrderSource.WEBSITE.getValue()){
328
		if(order.getSource() == OrderSource.STORE.getValue()){
-
 
329
			logoCell = new PdfPCell(new Phrase(""));
-
 
330
			
-
 
331
			logoCell.setBorder(Rectangle.NO_BORDER);
-
 
332
			logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
-
 
333
			
-
 
334
			logoTable.addCell(logoCell);
-
 
335
		}else{
329
			logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
336
			logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
330
			
337
			
331
			try {
338
			try {
332
				logoCell = new PdfPCell(Image.getInstance(logoPath), false);
339
				logoCell = new PdfPCell(Image.getInstance(logoPath), false);
333
			} catch (Exception e) {
340
			} catch (Exception e) {
Line 339... Line 346...
339
			logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
346
			logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
340
			
347
			
341
			logoTable.addCell(logoCell);
348
			logoTable.addCell(logoCell);
342
		
349
		
343
		}
350
		}
344
		
-
 
345
		if(order.getSource() == OrderSource.STORE.getValue()){
-
 
346
			logoCell = new PdfPCell(new Phrase(""));
-
 
347
			
-
 
348
			logoCell.setBorder(Rectangle.NO_BORDER);
-
 
349
			logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
-
 
350
			
-
 
351
			logoTable.addCell(logoCell);
-
 
352
		}
-
 
353
	}
351
	}
354
 
352
 
355
	private Font getBarCodeFont(Provider provider, float barcodeFontSize) {
353
	private Font getBarCodeFont(Provider provider, float barcodeFontSize) {
356
		String fontPath = InvoiceGenerationService.class.getResource("/" + provider.getName().toLowerCase() + "/barcode.TTF").getPath();
354
		String fontPath = InvoiceGenerationService.class.getResource("/" + provider.getName().toLowerCase() + "/barcode.TTF").getPath();
357
		FontFactoryImp ttfFontFactory = new FontFactoryImp();
355
		FontFactoryImp ttfFontFactory = new FontFactoryImp();