Subversion Repositories SmartDukaan

Rev

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

Rev 22215 Rev 22351
Line 80... Line 80...
80
            //columnRetailerInfo.addElement(new Paragraph("Invoice No:"));
80
            //columnRetailerInfo.addElement(new Paragraph("Invoice No:"));
81
            columnRetailerInfo.addElement(new Paragraph(StringUtils.capitalize(retailer.getBusinessName()), FONT_BOLD));
81
            columnRetailerInfo.addElement(new Paragraph(StringUtils.capitalize(retailer.getBusinessName()), FONT_BOLD));
82
           // columnRetailerInfo.addElement(new Paragraph("Plot No. 485, Udyog Vihar Phase V, Gurgoan-122016", FONT_BOLD));
82
           // columnRetailerInfo.addElement(new Paragraph("Plot No. 485, Udyog Vihar Phase V, Gurgoan-122016", FONT_BOLD));
83
            columnRetailerInfo.addElement(new Paragraph(StringUtils.capitalize(retailer.getAddress().getLine1()) + ", " + StringUtils.capitalize(retailer.getAddress().getLine2()) + ", " + StringUtils.capitalize(retailer.getAddress().getCity()) + "-" + retailer.getAddress().getPinCode() + ", " + retailer.getAddress().getState() + "(" + (gstWithInState? customerAddressStateCode : retailerAddressStateCode) + ")", FONT_BOLD));
83
            columnRetailerInfo.addElement(new Paragraph(StringUtils.capitalize(retailer.getAddress().getLine1()) + ", " + StringUtils.capitalize(retailer.getAddress().getLine2()) + ", " + StringUtils.capitalize(retailer.getAddress().getCity()) + "-" + retailer.getAddress().getPinCode() + ", " + retailer.getAddress().getState() + "(" + (gstWithInState? customerAddressStateCode : retailerAddressStateCode) + ")", FONT_BOLD));
84
            columnRetailerInfo.addElement(new Paragraph("Contact No.- "+retailer.getMobileNumber(), FONT_BOLD));
84
            columnRetailerInfo.addElement(new Paragraph("Contact No.- "+retailer.getMobileNumber(), FONT_BOLD));
85
            columnRetailerInfo.addElement(new Paragraph("TIN NO. " + retailer.getTinNumber(), FONT_BOLD));
85
            columnRetailerInfo.addElement(new Paragraph("GST NO. " + retailer.getGstNumber(), FONT_BOLD));
86
            columnRetailerInfo.setBorder(Rectangle.NO_BORDER);
86
            columnRetailerInfo.setBorder(Rectangle.NO_BORDER);
87
            PdfPTable tableInvoiceDateRetailer = new PdfPTable(1);
87
            PdfPTable tableInvoiceDateRetailer = new PdfPTable(1);
88
            tableInvoiceDateRetailer.getDefaultCell().setBorder(Rectangle.NO_BORDER);
88
            tableInvoiceDateRetailer.getDefaultCell().setBorder(Rectangle.NO_BORDER);
89
            PdfPTable tableInvoiceDate = new PdfPTable(2);
89
            PdfPTable tableInvoiceDate = new PdfPTable(2);
90
            tableInvoiceDate.getDefaultCell().setBorder(Rectangle.NO_BORDER);
90
            tableInvoiceDate.getDefaultCell().setBorder(Rectangle.NO_BORDER);
Line 290... Line 290...
290
            
290
            
291
            Paragraph warningParagraph = new Paragraph("Goods once sold will not be taken back.\nThis is a Computer Generated Invoice.", FONT_NORMAL);
291
            Paragraph warningParagraph = new Paragraph("Goods once sold will not be taken back.\nThis is a Computer Generated Invoice.", FONT_NORMAL);
292
            warningParagraph.setIndentationLeft(40);
292
            warningParagraph.setIndentationLeft(40);
293
            document.add(Chunk.NEWLINE);
293
            document.add(Chunk.NEWLINE);
294
            document.add(warningParagraph);
294
            document.add(warningParagraph);
295
            document.add(Chunk.NEWLINE);
-
 
296
            document.add(Chunk.NEWLINE);
-
 
297
            
295
            
298
            PdfPTable itemSerialNumbers = new PdfPTable(2);
-
 
299
            itemSerialNumbers.setWidthPercentage(90);
-
 
300
            itemSerialNumbers.addCell(new Paragraph("Item Name", FONT_BOLD));
-
 
301
            itemSerialNumbers.addCell(new Paragraph("Serial Number", FONT_BOLD));
-
 
302
            itemSerialNumbers.setHeaderRows(1);
-
 
303
            
-
 
304
            for(CustomFofoOrderItem orderItem : orderItems){
-
 
305
            	itemSerialNumbers.addCell(new Paragraph(orderItem.getDescription(), FONT_NORMAL));
-
 
306
            	itemSerialNumbers.addCell(new Paragraph(orderItem.getSerialNumbers().toString(), FONT_NORMAL));
-
 
307
            }
-
 
308
        	
-
 
309
            document.add(itemSerialNumbers);
-
 
310
            document.close(); // no need to close PDFwriter?
296
            document.close(); // no need to close PDFwriter?
311
 
297
 
312
        } catch (DocumentException e) {
298
        } catch (DocumentException e) {
313
            LOGGER.error("Unable to write data to pdf file : ", e);
299
            LOGGER.error("Unable to write data to pdf file : ", e);
314
        } catch (Exception e) {
300
        } catch (Exception e) {