Subversion Repositories SmartDukaan

Rev

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

Rev 8090 Rev 8091
Line 355... Line 355...
355
		logoTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
355
		logoTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
356
		logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
356
		logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
357
		
357
		
358
		PdfPCell logoCell;
358
		PdfPCell logoCell;
359
		String logoPath;
359
		String logoPath;
360
		System.out.println("Order Source Value........."+order.getSource());
360
		logger.info("Order Source Value.........",order.getSource());
361
		if(order.getSource() == OrderSource.STORE.getValue()){
361
		if(order.getSource() == OrderSource.STORE.getValue()){
362
			logoCell = new PdfPCell(new Phrase(""));
362
			logoCell = new PdfPCell(new Phrase(""));
363
			
363
			
364
		}else{
364
		}else{
365
			logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
365
			logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
366
			System.out.println("Logo Path........."+logoPath);
366
			logger.info("Logo Path.........",logoPath);
367
			try {
367
			try {
368
				logoCell = new PdfPCell(Image.getInstance(logoPath), false);
368
				logoCell = new PdfPCell(Image.getInstance(logoPath), false);
369
			} catch (Exception e) {
369
			} catch (Exception e) {
370
				//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
370
				//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
371
				logger.warn("Couldn't load the Saholic logo: ", e);
371
				logger.warn("Couldn't load the Saholic logo: ", e);
Line 571... Line 571...
571
		PdfPTable taxTable = new PdfPTable(1);
571
		PdfPTable taxTable = new PdfPTable(1);
572
		Phrase phrase = null;
572
		Phrase phrase = null;
573
		taxTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
573
		taxTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
574
		taxTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
574
		taxTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
575
 
575
 
576
//		PdfPTable logoTable = new PdfPTable(2);
576
		PdfPTable logoTable = new PdfPTable(2);
577
//		addLogoTable(logoTable, order);
577
		addLogoTable(logoTable, order);
578
		
578
		
579
		if (order.getOrderType().equals(OrderType.B2B)) {
579
		if (order.getOrderType().equals(OrderType.B2B)) {
580
			phrase = new Phrase("TAX INVOICE", helveticaBold12);
580
			phrase = new Phrase("TAX INVOICE", helveticaBold12);
581
		} else {
581
		} else {
582
			phrase = new Phrase("RETAIL INVOICE", helveticaBold12);
582
			phrase = new Phrase("RETAIL INVOICE", helveticaBold12);