Subversion Repositories SmartDukaan

Rev

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

Rev 26821 Rev 27247
Line 65... Line 65...
65
 
65
 
66
	private static final Locale indianLocale = Locale.getDefault();
66
	private static final Locale indianLocale = Locale.getDefault();
67
 
67
 
68
	private static final Logger LOGGER = LogManager.getLogger(PdfUtils.class);
68
	private static final Logger LOGGER = LogManager.getLogger(PdfUtils.class);
69
 
69
 
70
	private static final URL iconUrl = PdfUtils.class.getClassLoader().getResource("sdicon.png");
70
	private static final URL iconUrl = PdfUtils.class.getClassLoader().getResource("sdlogo.png");
71
	private static Image iconImg = null;
71
	private static Image iconImg = null;
72
	static {
72
	static {
73
		try {
73
		try {
74
			iconImg = Image.getInstance(iconUrl);
74
			iconImg = Image.getInstance(iconUrl);
75
		} catch (Exception e) {
75
		} catch (Exception e) {
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("Disc.", 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));
196
					orders.addCell(new Paragraph("IGST\n%", FONT_BOLD));
197
					orders.addCell(new Paragraph("IGST", FONT_BOLD));
197
					orders.addCell(new Paragraph("IGST", FONT_BOLD));
198
					// orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1});
198
					// orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1});
Line 218... Line 218...
218
					orders.addCell(new Paragraph(String.valueOf(index++), FONT_NORMAL));
218
					orders.addCell(new Paragraph(String.valueOf(index++), FONT_NORMAL));
219
					orders.addCell(new Paragraph(orderItem.getDescription(), FONT_NORMAL));
219
					orders.addCell(new Paragraph(orderItem.getDescription(), FONT_NORMAL));
220
					orders.addCell(new Paragraph(orderItem.getHsnCode(), FONT_NORMAL));
220
					orders.addCell(new Paragraph(orderItem.getHsnCode(), FONT_NORMAL));
221
					orders.addCell(new Paragraph(String.valueOf(orderItem.getQuantity()), FONT_NORMAL));
221
					orders.addCell(new Paragraph(String.valueOf(orderItem.getQuantity()), FONT_NORMAL));
222
					orders.addCell(new Paragraph(String.format("%.2f", orderItem.getRate()), FONT_NORMAL));
222
					orders.addCell(new Paragraph(String.format("%.2f", orderItem.getRate()), FONT_NORMAL));
223
					orders.addCell(new Paragraph(String.format("%.2f", orderItem.getDiscount()), FONT_NORMAL));
223
					//orders.addCell(new Paragraph(String.format("%.2f", orderItem.getDiscount()), FONT_NORMAL));
224
					orders.addCell(new Paragraph(String.format("%.2f", orderItem.getAmount()), FONT_NORMAL));
224
					orders.addCell(new Paragraph(String.format("%.2f", orderItem.getAmount()), FONT_NORMAL));
225
					if (!stateGst) {
225
					if (!stateGst) {
226
						orders.addCell(new Paragraph(String.format("%.2f", orderItem.getIgstRate()), FONT_NORMAL));
226
						orders.addCell(new Paragraph(String.format("%.2f", orderItem.getIgstRate()), FONT_NORMAL));
227
						orders.addCell(new Paragraph(String.format("%.2f", orderItem.getIgstAmount()), FONT_NORMAL));
227
						orders.addCell(new Paragraph(String.format("%.2f", orderItem.getIgstAmount()), FONT_NORMAL));
228
						igstTotalAmount = igstTotalAmount + orderItem.getIgstAmount();
228
						igstTotalAmount = igstTotalAmount + orderItem.getIgstAmount();