Subversion Repositories SmartDukaan

Rev

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

Rev 36137 Rev 36138
Line 636... Line 636...
636
                supplierCell.addElement(new Paragraph("GSTIN: " + retailer.getGstNumber(), MS_NORMAL));
636
                supplierCell.addElement(new Paragraph("GSTIN: " + retailer.getGstNumber(), MS_NORMAL));
637
                supplierCell.addElement(new Paragraph("State: " + retailer.getAddress().getState()
637
                supplierCell.addElement(new Paragraph("State: " + retailer.getAddress().getState()
638
                        + "  |  Code: " + stateCode, MS_NORMAL));
638
                        + "  |  Code: " + stateCode, MS_NORMAL));
639
                headerTable.addCell(supplierCell);
639
                headerTable.addCell(supplierCell);
640
 
640
 
-
 
641
                boolean isChallan = titleText.contains("CHALLAN");
641
                String invoiceLabel = (titleText.contains("CHALLAN")) ? "DC No:" : "Invoice No:";
642
                String docLabel = isChallan ? "Challan No:" : "Invoice No:";
-
 
643
                String sectionLabel = isChallan ? "CHALLAN DETAILS" : "INVOICE DETAILS";
642
                PdfPCell invoiceCell = new PdfPCell();
644
                PdfPCell invoiceCell = new PdfPCell();
643
                invoiceCell.setBorder(Rectangle.NO_BORDER);
645
                invoiceCell.setBorder(Rectangle.NO_BORDER);
644
                invoiceCell.setPadding(4f);
646
                invoiceCell.setPadding(4f);
645
                invoiceCell.setPaddingRight(0f);
647
                invoiceCell.setPaddingRight(0f);
646
                invoiceCell.addElement(msRightPara("INVOICE DETAILS", MS_SECTION));
648
                invoiceCell.addElement(msRightPara(sectionLabel, MS_SECTION));
647
                invoiceCell.addElement(msSpacer(2f));
649
                invoiceCell.addElement(msSpacer(2f));
648
                invoiceCell.addElement(msRightPara(invoiceLabel + " " + pdfModel.getInvoiceNumber(), MS_BOLD));
650
                invoiceCell.addElement(msRightPara(docLabel + " " + pdfModel.getInvoiceNumber(), MS_BOLD));
649
                invoiceCell.addElement(msRightPara("Date: " + pdfModel.getInvoiceDate(), MS_NORMAL));
651
                invoiceCell.addElement(msRightPara("Date: " + pdfModel.getInvoiceDate(), MS_NORMAL));
650
                String supplyType = stateGst ? "Intra-state" : "Inter-state";
652
                String supplyType = stateGst ? "Intra-state" : "Inter-state";
651
                invoiceCell.addElement(msRightPara("Place of supply: " + customer.getAddress().getState()
653
                invoiceCell.addElement(msRightPara("Place of supply: " + customer.getAddress().getState()
652
                        + " (" + pdfModel.getCustomerAddressStateCode() + ")", MS_NORMAL));
654
                        + " (" + pdfModel.getCustomerAddressStateCode() + ")", MS_NORMAL));
653
                invoiceCell.addElement(msRightPara("Supply type: " + supplyType, MS_NORMAL));
655
                invoiceCell.addElement(msRightPara("Supply type: " + supplyType, MS_NORMAL));