Subversion Repositories SmartDukaan

Rev

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

Rev 22684 Rev 22685
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 = {};
38
	private static float[] igstWidthsWithDiscount = new float[]{.3f, 2.6f, 0.7f, .4f, 0.7f, 0.5f, .7f, .6f, 0.6f, 0.9f};
40
	private static float[] sgstWidths = {};
-
 
41
	private static float[] sgstWidthsWithDiscount = {};
39
	private static float[] stateWidthsWithDiscount = new float[]{.2f, 2.1f, 0.7f, .3f, 0.6f, 0.4f, .7f, .5f, .6f, .5f, .6f, .8f};
42
	
40
	
43
	private static final Locale indianLocale = Locale.getDefault();
41
	private static final Locale indianLocale = Locale.getDefault();
44
	
42
	
45
	private static final Logger LOGGER = LoggerFactory.getLogger(PdfUtils.class);
43
	private static final Logger LOGGER = LoggerFactory.getLogger(PdfUtils.class);
46
	
44
	
Line 116... Line 114...
116
            tableCustomerRetailer.addCell(blankCell);
114
            tableCustomerRetailer.addCell(blankCell);
117
            tableCustomerRetailer.addCell(tableInvoiceDateRetailer);
115
            tableCustomerRetailer.addCell(tableInvoiceDateRetailer);
118
            
116
            
119
            PdfPTable orders = null;
117
            PdfPTable orders = null;
120
            if(!gstWithInState){
118
            if(!gstWithInState){
121
            	orders = new PdfPTable(9);
119
            	orders = new PdfPTable(igstWidthsWithDiscount.length);
-
 
120
            	orders.setWidths(igstWidthsWithDiscount);
122
            }else{
121
            }else{
123
            	orders = new PdfPTable(11);
122
            	orders = new PdfPTable(stateWidthsWithDiscount.length);
-
 
123
            	orders.setWidths(stateWidthsWithDiscount);
124
            }
124
            }
125
            orders.setWidthPercentage(90);
125
            orders.setWidthPercentage(90);
126
            orders.addCell(new Paragraph("Sl", FONT_BOLD));
126
            orders.addCell(new Paragraph("Sl", FONT_BOLD));
127
            orders.addCell(new Paragraph("Description", FONT_BOLD));
127
            orders.addCell(new Paragraph("Description", FONT_BOLD));
128
            orders.addCell(new Paragraph("HSN", FONT_BOLD));
128
            orders.addCell(new Paragraph("HSN", FONT_BOLD));
Line 133... Line 133...
133
            if(!gstWithInState){
133
            if(!gstWithInState){
134
            	orders.addCell(new Paragraph("IGST\n%", FONT_BOLD));
134
            	orders.addCell(new Paragraph("IGST\n%", FONT_BOLD));
135
                orders.addCell(new Paragraph("IGST", FONT_BOLD));
135
                orders.addCell(new Paragraph("IGST", FONT_BOLD));
136
                //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
137
                //total 8f
138
                orders.setWidths(new float[]{.3f, 2.6f, 0.7f, .4f, 0.7f, 0.5f, .7f, .6f, 0.6f, 0.9f});
-
 
139
            }else{
138
            }else{
140
            	orders.addCell(new Paragraph("CGST %", FONT_BOLD));
139
            	orders.addCell(new Paragraph("CGST %", FONT_BOLD));
141
                orders.addCell(new Paragraph("CGST", FONT_BOLD));
140
                orders.addCell(new Paragraph("CGST", FONT_BOLD));
142
                orders.addCell(new Paragraph("SGST %", FONT_BOLD));
141
                orders.addCell(new Paragraph("SGST %", FONT_BOLD));
143
                orders.addCell(new Paragraph("SGST", FONT_BOLD));
142
                orders.addCell(new Paragraph("SGST", FONT_BOLD));
144
                //orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1, 1, 1});
143
                //orders.setWidths(new float[]{1, 3, 1, 1, 1, 1, 1, 1, 1, 1});
145
                //total 8f
144
                //total 8f
146
                orders.setWidths(new float[]{.2f, 2.1f, 0.7f, .3f, 0.6f, 0.4f, .7f, .5f, .6f, .5f, .6f, .8f});
-
 
147
            }
145
            }
148
            orders.addCell(new Paragraph("Total", FONT_BOLD));
146
            orders.addCell(new Paragraph("Total", FONT_BOLD));
149
            
147
            
150
            //orders.addCell(new Paragraph("Item Total (Rs)", FONT_BOLD));
148
            //orders.addCell(new Paragraph("Item Total (Rs)", FONT_BOLD));
151
            
149