Subversion Repositories SmartDukaan

Rev

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

Rev 8098 Rev 8099
Line 266... Line 266...
266
		Font barCodeFont = getBarCodeFont(provider, barcodeFontSize);
266
		Font barCodeFont = getBarCodeFont(provider, barcodeFontSize);
267
 
267
 
268
		PdfPTable table = new PdfPTable(1);
268
		PdfPTable table = new PdfPTable(1);
269
		table.getDefaultCell().setBorder(Rectangle.NO_BORDER);
269
		table.getDefaultCell().setBorder(Rectangle.NO_BORDER);
270
 
270
 
271
		PdfPTable logoTable = addLogoTable(order); 
271
		//PdfPTable logoTable = addLogoTable(order); 
-
 
272
		PdfPTable logoTable = new PdfPTable(2);
-
 
273
		logoTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
-
 
274
		logoTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
-
 
275
		logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
-
 
276
				
-
 
277
		PdfPCell logoCell = new PdfPCell(new Phrase(""));
-
 
278
		String logoPath;
-
 
279
		Image logo=null;
-
 
280
		logger.info("Order Source Value........."+order.getSource());
-
 
281
		if(order.getSource() == OrderSource.STORE.getValue()){
-
 
282
			
-
 
283
			
-
 
284
		}else{
-
 
285
			logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
-
 
286
			logger.info("Logo Path........."+logoPath);
-
 
287
			
-
 
288
			try {
-
 
289
				logo = Image.getInstance(logoPath);
-
 
290
			} catch (Exception e) {
-
 
291
				//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
-
 
292
				logger.warn("Couldn't load the Saholic logo: ", e);
-
 
293
				logoCell = new PdfPCell(new Phrase("Saholic Logo"));
-
 
294
			}
-
 
295
		
-
 
296
		}
-
 
297
		logoCell.setBorder(Rectangle.NO_BORDER);
-
 
298
		logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
-
 
299
		if(logo!=null)
-
 
300
			logoTable.addCell(logo);
-
 
301
		else{
-
 
302
			logoTable.addCell(logoCell);
-
 
303
		}
272
		
304
		
273
		PdfPCell titleCell = getTitleCell();
305
		PdfPCell titleCell = getTitleCell();
274
		PdfPTable customerTable = getCustomerAddressTable(order, destCode, false, helvetica12, false);
306
		PdfPTable customerTable = getCustomerAddressTable(order, destCode, false, helvetica12, false);
275
		PdfPTable providerInfoTable = getProviderTable(order, provider, barCodeFont);
307
		PdfPTable providerInfoTable = getProviderTable(order, provider, barCodeFont);
276
 
308