Subversion Repositories SmartDukaan

Rev

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

Rev 36183 Rev 36572
Line 639... Line 639...
639
                        + "  |  Code: " + stateCode, MS_NORMAL));
639
                        + "  |  Code: " + stateCode, MS_NORMAL));
640
                headerTable.addCell(supplierCell);
640
                headerTable.addCell(supplierCell);
641
 
641
 
642
                boolean isChallan = titleText.contains("CHALLAN");
642
                boolean isChallan = titleText.contains("CHALLAN");
643
                boolean isCreditNote = titleText.contains("CREDIT");
643
                boolean isCreditNote = titleText.contains("CREDIT");
-
 
644
                boolean isDebitNote = titleText.contains("DEBIT");
644
                String docName = isCreditNote ? "credit note" : (isChallan ? "delivery challan" : "invoice");
645
                String docName = isCreditNote ? "credit note" : (isDebitNote ? "debit note" : (isChallan ? "delivery challan" : "invoice"));
645
                String docLabel = isCreditNote ? "CN No:" : (isChallan ? "Challan No:" : "Invoice No:");
646
                String docLabel = isCreditNote ? "CN No:" : (isDebitNote ? "DN No:" : (isChallan ? "Challan No:" : "Invoice No:"));
646
                String sectionLabel = isCreditNote ? "CREDIT NOTE DETAILS" : (isChallan ? "CHALLAN DETAILS" : "INVOICE DETAILS");
647
                String sectionLabel = isCreditNote ? "CREDIT NOTE DETAILS" : (isDebitNote ? "DEBIT NOTE DETAILS" : (isChallan ? "CHALLAN DETAILS" : "INVOICE DETAILS"));
647
                PdfPCell invoiceCell = new PdfPCell();
648
                PdfPCell invoiceCell = new PdfPCell();
648
                invoiceCell.setBorder(Rectangle.NO_BORDER);
649
                invoiceCell.setBorder(Rectangle.NO_BORDER);
649
                invoiceCell.setPadding(4f);
650
                invoiceCell.setPadding(4f);
650
                invoiceCell.setPaddingRight(0f);
651
                invoiceCell.setPaddingRight(0f);
651
                invoiceCell.addElement(msRightPara(sectionLabel, MS_SECTION));
652
                invoiceCell.addElement(msRightPara(sectionLabel, MS_SECTION));
Line 823... Line 824...
823
                    msAddSummaryRow(sumTable, "GST on Margin", "Rs. " + formatIndianCurrency(totalTaxAmount), false);
824
                    msAddSummaryRow(sumTable, "GST on Margin", "Rs. " + formatIndianCurrency(totalTaxAmount), false);
824
                } else {
825
                } else {
825
                    msAddSummaryRow(sumTable, "Total Taxable Value", "Rs. " + formatIndianCurrency(totalTaxable), false);
826
                    msAddSummaryRow(sumTable, "Total Taxable Value", "Rs. " + formatIndianCurrency(totalTaxable), false);
826
                    msAddSummaryRow(sumTable, "Total GST", "Rs. " + formatIndianCurrency(totalTaxAmount), false);
827
                    msAddSummaryRow(sumTable, "Total GST", "Rs. " + formatIndianCurrency(totalTaxAmount), false);
827
                }
828
                }
828
                String totalValueLabel = isCreditNote ? "Total Credit Note Value" : (isChallan ? "Total Challan Value" : "Total Invoice Value");
829
                String totalValueLabel = isCreditNote ? "Total Credit Note Value" : (isDebitNote ? "Total Debit Note Value" : (isChallan ? "Total Challan Value" : "Total Invoice Value"));
829
                msAddSummaryRow(sumTable, totalValueLabel, "Rs. " + formatIndianCurrency(totalInvoiceValue), true);
830
                msAddSummaryRow(sumTable, totalValueLabel, "Rs. " + formatIndianCurrency(totalInvoiceValue), true);
830
                summaryCell.addElement(sumTable);
831
                summaryCell.addElement(sumTable);
831
                bottomTable.addCell(summaryCell);
832
                bottomTable.addCell(summaryCell);
832
 
833
 
833
                // Row 2: empty (left) + Amount in words (right) — no gap
834
                // Row 2: empty (left) + Amount in words (right) — no gap