| Line 33... |
Line 33... |
| 33 |
private static Font FONT_NORMAL = new Font(Font.FontFamily.TIMES_ROMAN, 10, Font.NORMAL);
|
33 |
private static Font FONT_NORMAL = new Font(Font.FontFamily.TIMES_ROMAN, 10, Font.NORMAL);
|
| 34 |
private static Font FONT_BOLD = new Font(Font.FontFamily.TIMES_ROMAN, 10, Font.BOLD);
|
34 |
private static Font FONT_BOLD = new Font(Font.FontFamily.TIMES_ROMAN, 10, Font.BOLD);
|
| 35 |
//private static Font fontTableHeader = new Font(Font.FontFamily.TIMES_ROMAN, 14, Font.BOLD);
|
35 |
//private static Font fontTableHeader = new Font(Font.FontFamily.TIMES_ROMAN, 14, Font.BOLD);
|
| 36 |
private static final String INVOICE_TITLE = "INVOICE";
|
36 |
private static final String INVOICE_TITLE = "INVOICE";
|
| 37 |
|
37 |
|
| - |
|
38 |
private static float[] igstWidths = {};
|
| - |
|
39 |
private static float[] igstWidthsWithDiscount = {};
|
| - |
|
40 |
private static float[] sgstWidths = {};
|
| - |
|
41 |
private static float[] sgstWidthsWithDiscount = {};
|
| - |
|
42 |
|
| 38 |
private static final Locale indianLocale = Locale.getDefault();
|
43 |
private static final Locale indianLocale = Locale.getDefault();
|
| 39 |
|
44 |
|
| 40 |
private static final Logger LOGGER = LoggerFactory.getLogger(PdfUtils.class);
|
45 |
private static final Logger LOGGER = LoggerFactory.getLogger(PdfUtils.class);
|
| 41 |
|
46 |
|
| 42 |
public static void generateAndWrite(PdfModel pdfModel, OutputStream outputStream){
|
47 |
public static void generateAndWrite(PdfModel pdfModel, OutputStream outputStream){
|
| Line 127... |
Line 132... |
| 127 |
orders.addCell(new Paragraph("Total(Rs)", FONT_BOLD));
|
132 |
orders.addCell(new Paragraph("Total(Rs)", FONT_BOLD));
|
| 128 |
if(!gstWithInState){
|
133 |
if(!gstWithInState){
|
| 129 |
orders.addCell(new Paragraph("IGST %", FONT_BOLD));
|
134 |
orders.addCell(new Paragraph("IGST %", FONT_BOLD));
|
| 130 |
orders.addCell(new Paragraph("IGST", FONT_BOLD));
|
135 |
orders.addCell(new Paragraph("IGST", FONT_BOLD));
|
| 131 |
//orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1});
|
136 |
//orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1});
|
| - |
|
137 |
//total 8f
|
| 132 |
orders.setWidths(new float[]{.6f, 2.3f, 1.2f, .7f, 1.0f, 1.0f, 1.0f, .9f, .9f});
|
138 |
orders.setWidths(new float[]{.4f, 2.3f, 0.8f, .4f, 1.0f, 0.8f, 0.9f, .6f, .6f});
|
| 133 |
}else{
|
139 |
}else{
|
| - |
|
140 |
//total 8f
|
| 134 |
orders.addCell(new Paragraph("CGST %", FONT_BOLD));
|
141 |
orders.addCell(new Paragraph("CGST %", FONT_BOLD));
|
| 135 |
orders.addCell(new Paragraph("CGST", FONT_BOLD));
|
142 |
orders.addCell(new Paragraph("CGST", FONT_BOLD));
|
| 136 |
orders.addCell(new Paragraph("SGST %", FONT_BOLD));
|
143 |
orders.addCell(new Paragraph("SGST %", FONT_BOLD));
|
| 137 |
orders.addCell(new Paragraph("SGST", FONT_BOLD));
|
144 |
orders.addCell(new Paragraph("SGST", FONT_BOLD));
|
| 138 |
//orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1, 1, 1});
|
145 |
//orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1, 1, 1});
|
| 139 |
orders.setWidths(new float[]{.6f, 2.3f, 1.2f, .7f, 1.1f, 1.1f,1.1f, .9f, .9f, .9f, .9f});
|
146 |
orders.setWidths(new float[]{.4f, 2.3f, 0.8f, .4f, 1.0f, 0.8f, 0.8f, .7f, .7f, .7f, .7f});
|
| 140 |
}
|
147 |
}
|
| 141 |
|
148 |
|
| 142 |
//orders.addCell(new Paragraph("Item Total (Rs)", FONT_BOLD));
|
149 |
//orders.addCell(new Paragraph("Item Total (Rs)", FONT_BOLD));
|
| 143 |
|
150 |
|
| 144 |
orders.setHeaderRows(1);
|
151 |
orders.setHeaderRows(1);
|