| Line 50... |
Line 50... |
| 50 |
// Font(Font.FontFamily.TIMES_ROMAN, 14, Font.BOLD);
|
50 |
// Font(Font.FontFamily.TIMES_ROMAN, 14, Font.BOLD);
|
| 51 |
public static final String INVOICE_TITLE = "TAX INVOICE";
|
51 |
public static final String INVOICE_TITLE = "TAX INVOICE";
|
| 52 |
public static final String DEBIT_NOTE_TITLE = "DEBIT NOTE";
|
52 |
public static final String DEBIT_NOTE_TITLE = "DEBIT NOTE";
|
| 53 |
public static final String SECURITY_DEPOSIT = "SECURITY DEPOSIT RECEIPT";
|
53 |
public static final String SECURITY_DEPOSIT = "SECURITY DEPOSIT RECEIPT";
|
| 54 |
|
54 |
|
| 55 |
private static float[] igstWidthsWithDiscount = new float[] { .3f, 2.6f, 0.7f, .4f, 0.7f, 0.5f, .7f, .6f, 0.6f,
|
55 |
private static float[] igstWidthsWithDiscount = new float[] { .2f, 2.6f, 0.7f, .4f, 0.7f, 0.6f, .7f, .6f,
|
| 56 |
0.9f };
|
56 |
0.7f };
|
| 57 |
private static float[] stateWidthsWithDiscount = new float[] { .3f, 2.1f, 0.7f, .3f, 0.6f, 0.4f, .7f, .5f, .6f, .5f,
|
57 |
private static float[] stateWidthsWithDiscount = new float[] { .2f, 2.1f, 0.7f, .3f, 0.6f, 0.5f, .7f, .6f,
|
| 58 |
.6f, .8f };
|
58 |
.6f, .7f };
|
| 59 |
|
59 |
|
| 60 |
private static float[] igstWidths = new float[] { .6f, 2.6f, 0.7f, .4f, 0.7f, .7f, .6f, 0.6f, 0.9f };
|
60 |
private static float[] igstWidths = new float[] { .6f, 2.6f, 0.7f, .4f, 0.7f, .7f, .6f, 0.6f, 0.9f };
|
| 61 |
private static float[] stateWidths = new float[] { .6f, 2.1f, 0.7f, .3f, 0.6f, .7f, .5f, .6f, .5f, .6f, .8f };
|
61 |
private static float[] stateWidths = new float[] { .6f, 2.1f, 0.7f, .3f, 0.6f, .7f, .5f, .6f, .5f, .6f, .8f };
|
| 62 |
|
62 |
|
| 63 |
private static float[] igstWidthsCrNote = new float[] { 2.6f, 0.7f, .4f, 0.7f, .7f, .6f, 0.6f, 0.9f };
|
63 |
private static float[] igstWidthsCrNote = new float[] { 2.6f, 0.7f, .4f, 0.7f, .7f, .6f, 0.6f, 0.9f };
|
| Line 188... |
Line 188... |
| 188 |
orders.addCell(new Paragraph("Sl", FONT_BOLD));
|
188 |
orders.addCell(new Paragraph("Sl", FONT_BOLD));
|
| 189 |
orders.addCell(new Paragraph("Description", FONT_BOLD));
|
189 |
orders.addCell(new Paragraph("Description", FONT_BOLD));
|
| 190 |
orders.addCell(new Paragraph("HSN", FONT_BOLD));
|
190 |
orders.addCell(new Paragraph("HSN", FONT_BOLD));
|
| 191 |
orders.addCell(new Paragraph("Qty", FONT_BOLD));
|
191 |
orders.addCell(new Paragraph("Qty", FONT_BOLD));
|
| 192 |
orders.addCell(new Paragraph("Rate\n(Per pc)", FONT_BOLD));
|
192 |
orders.addCell(new Paragraph("Rate\n(Per pc)", FONT_BOLD));
|
| 193 |
orders.addCell(new Paragraph("Disc.", FONT_BOLD));
|
193 |
orders.addCell(new Paragraph("Discount", FONT_BOLD));
|
| 194 |
orders.addCell(new Paragraph("Total\nTaxable", FONT_BOLD));
|
194 |
orders.addCell(new Paragraph("Total\nTaxable", FONT_BOLD));
|
| 195 |
if (!stateGst) {
|
195 |
if (!stateGst) {
|
| 196 |
orders.addCell(new Paragraph("IGST\n%", FONT_BOLD));
|
- |
|
| 197 |
orders.addCell(new Paragraph("IGST", FONT_BOLD));
|
196 |
orders.addCell(new Paragraph("IGST", FONT_BOLD));
|
| 198 |
// orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1});
|
197 |
// orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1});
|
| 199 |
// total 8f
|
198 |
// total 8f
|
| 200 |
} else {
|
199 |
} else {
|
| 201 |
orders.addCell(new Paragraph("CGST %", FONT_BOLD));
|
- |
|
| 202 |
orders.addCell(new Paragraph("CGST", FONT_BOLD));
|
200 |
orders.addCell(new Paragraph("CGST", FONT_BOLD));
|
| 203 |
orders.addCell(new Paragraph("SGST %", FONT_BOLD));
|
- |
|
| 204 |
orders.addCell(new Paragraph("SGST", FONT_BOLD));
|
201 |
orders.addCell(new Paragraph("SGST", FONT_BOLD));
|
| 205 |
// orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1, 1, 1});
|
202 |
// orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1, 1, 1});
|
| 206 |
// total 8f
|
203 |
// total 8f
|
| 207 |
}
|
204 |
}
|
| 208 |
orders.addCell(new Paragraph("Total", FONT_BOLD));
|
205 |
orders.addCell(new Paragraph("Total", FONT_BOLD));
|
| Line 221... |
Line 218... |
| 221 |
orders.addCell(new Paragraph(String.valueOf(orderItem.getQuantity()), FONT_NORMAL));
|
218 |
orders.addCell(new Paragraph(String.valueOf(orderItem.getQuantity()), FONT_NORMAL));
|
| 222 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getRate()), FONT_NORMAL));
|
219 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getRate()), FONT_NORMAL));
|
| 223 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getDiscount()), FONT_NORMAL));
|
220 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getDiscount()), FONT_NORMAL));
|
| 224 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getAmount()), FONT_NORMAL));
|
221 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getAmount()), FONT_NORMAL));
|
| 225 |
if (!stateGst) {
|
222 |
if (!stateGst) {
|
| 226 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getIgstRate()), FONT_NORMAL));
|
- |
|
| 227 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getIgstAmount()), FONT_NORMAL));
|
223 |
orders.addCell(new Paragraph(String.format("%.2f%n(@%.0f%%)", orderItem.getIgstAmount(), orderItem.getIgstRate()), FONT_NORMAL));
|
| 228 |
igstTotalAmount = igstTotalAmount + orderItem.getIgstAmount();
|
224 |
igstTotalAmount = igstTotalAmount + orderItem.getIgstAmount();
|
| 229 |
} else {
|
225 |
} else {
|
| 230 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getCgstRate()), FONT_NORMAL));
|
- |
|
| 231 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getCgstAmount()), FONT_NORMAL));
|
226 |
orders.addCell(new Paragraph(String.format("%.2f%n(@%.0f%%)", orderItem.getCgstAmount(), orderItem.getCgstRate()), FONT_NORMAL));
|
| 232 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getSgstRate()), FONT_NORMAL));
|
- |
|
| 233 |
orders.addCell(new Paragraph(String.format("%.2f", orderItem.getSgstAmount()), FONT_NORMAL));
|
227 |
orders.addCell(new Paragraph(String.format("%.2f%n(@%.0f%%)", orderItem.getSgstAmount(), orderItem.getSgstRate()), FONT_NORMAL));
|
| 234 |
cgstTotalAmount = cgstTotalAmount + orderItem.getCgstAmount();
|
228 |
cgstTotalAmount = cgstTotalAmount + orderItem.getCgstAmount();
|
| 235 |
sgstTotalAmount = sgstTotalAmount + orderItem.getSgstAmount();
|
229 |
sgstTotalAmount = sgstTotalAmount + orderItem.getSgstAmount();
|
| 236 |
}
|
230 |
}
|
| 237 |
orders.addCell(new Paragraph(String.format("%.0f", orderItem.getNetAmount()), FONT_NORMAL));
|
231 |
orders.addCell(new Paragraph(String.format("%.0f", orderItem.getNetAmount()), FONT_NORMAL));
|
| 238 |
// orders.addCell(new Paragraph(String.format("%.2f",
|
232 |
// orders.addCell(new Paragraph(String.format("%.2f",
|