Subversion Repositories SmartDukaan

Rev

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

Rev 17470 Rev 17501
Line 985... Line 985...
985
				totalShippingCost = totalShippingCost + order.getShippingCost();
985
				totalShippingCost = totalShippingCost + order.getShippingCost();
986
			}
986
			}
987
		}
987
		}
988
		if(totalShippingCost>0){
988
		if(totalShippingCost>0){
989
			invoiceTable.addCell(getShippingCostCell(4));      
989
			invoiceTable.addCell(getShippingCostCell(4));      
990
			invoiceTable.addCell(getRupeesCell());
990
			invoiceTable.addCell(getRupeesCell(false));
991
			invoiceTable.addCell(getTotalAmountCell(totalShippingCost));
991
			invoiceTable.addCell(getPriceCell(totalShippingCost));
992
		}
992
		}
993
		invoiceTable.addCell(getTotalCell(4));      
993
		invoiceTable.addCell(getTotalCell(4));      
994
		invoiceTable.addCell(getRupeesCell());
994
		invoiceTable.addCell(getRupeesCell(true));
995
		invoiceTable.addCell(getTotalAmountCell(totalAmount+totalShippingCost));
995
		invoiceTable.addCell(getTotalAmountCell(totalAmount+totalShippingCost));
996
		
996
		
997
 
997
 
998
		PdfPCell tinCell = new PdfPCell(new Phrase("TIN NO. " + tinNo, helvetica8));
998
		PdfPCell tinCell = new PdfPCell(new Phrase("TIN NO. " + tinNo, helvetica8));
999
		tinCell.setColspan(6);
999
		tinCell.setColspan(6);
Line 1554... Line 1554...
1554
		if(insuranceAmount>0){
1554
		if(insuranceAmount>0){
1555
			invoiceTable.addCell(getInsuranceCell(7));
1555
			invoiceTable.addCell(getInsuranceCell(7));
1556
			invoiceTable.addCell(getPriceCell(insuranceAmount));
1556
			invoiceTable.addCell(getPriceCell(insuranceAmount));
1557
		}
1557
		}
1558
		if(totalShippingCost>0){
1558
		if(totalShippingCost>0){
1559
			invoiceTable.addCell(getShippingCostCell(4));      
1559
			invoiceTable.addCell(getShippingCostCell(6));      
1560
			invoiceTable.addCell(getRupeesCell());
1560
			invoiceTable.addCell(getRupeesCell(false));
1561
			invoiceTable.addCell(getTotalAmountCell(totalShippingCost));
1561
			invoiceTable.addCell(getPriceCell(totalShippingCost));
1562
		}
1562
		}
1563
		invoiceTable.addCell(getTotalCell(6));
1563
		invoiceTable.addCell(getTotalCell(6));
1564
		invoiceTable.addCell(getRupeesCell());
1564
		invoiceTable.addCell(getRupeesCell(true));
1565
		invoiceTable.addCell(getTotalAmountCell(totalAmount+totalShippingCost));
1565
		invoiceTable.addCell(getTotalAmountCell(totalAmount+totalShippingCost));
1566
 
1566
 
1567
		invoiceTable.addCell(new Phrase("Amount in Words:", helveticaBold8));
1567
		invoiceTable.addCell(new Phrase("Amount in Words:", helveticaBold8));
1568
		invoiceTable.addCell(getAmountInWordsCell(totalAmount+totalShippingCost));
1568
		invoiceTable.addCell(getAmountInWordsCell(totalAmount+totalShippingCost));
1569
 
1569
 
Line 1677... Line 1677...
1677
	}
1677
	}
1678
	
1678
	
1679
	private PdfPCell getShippingCostCell(int colspan) {
1679
	private PdfPCell getShippingCostCell(int colspan) {
1680
		PdfPCell shippingCostCell = new PdfPCell(new Phrase("Shipping Charges", helvetica8));
1680
		PdfPCell shippingCostCell = new PdfPCell(new Phrase("Shipping Charges", helvetica8));
1681
		shippingCostCell.setColspan(colspan);
1681
		shippingCostCell.setColspan(colspan);
-
 
1682
		shippingCostCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
1682
		return shippingCostCell;
1683
		return shippingCostCell;
1683
	}
1684
	}
1684
	
1685
	
1685
	private PdfPCell getCodChargesCell(int colspan) {
1686
	private PdfPCell getCodChargesCell(int colspan) {
1686
		PdfPCell codChargesCell = new PdfPCell(new Phrase("COD Charges", helvetica8));
1687
		PdfPCell codChargesCell = new PdfPCell(new Phrase("COD Charges", helvetica8));
Line 1693... Line 1694...
1693
		totalCell.setColspan(colspan);
1694
		totalCell.setColspan(colspan);
1694
		totalCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
1695
		totalCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
1695
		return totalCell;
1696
		return totalCell;
1696
	}
1697
	}
1697
 
1698
 
1698
	private PdfPCell getRupeesCell() {
1699
	private PdfPCell getRupeesCell(boolean useBold) {
-
 
1700
		PdfPCell rupeesCell;
-
 
1701
		if(useBold)
1699
		PdfPCell rupeesCell = new PdfPCell(new Phrase("Rs.", helveticaBold8));
1702
			rupeesCell= new PdfPCell(new Phrase("Rs.", helveticaBold8));
-
 
1703
		else
-
 
1704
			rupeesCell= new PdfPCell(new Phrase("Rs.", helvetica8));
1700
		rupeesCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
1705
		rupeesCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
1701
		return rupeesCell;
1706
		return rupeesCell;
1702
	}
1707
	}
1703
 
1708
 
1704
	private PdfPCell getTotalAmountCell(double orderAmount) {
1709
	private PdfPCell getTotalAmountCell(double orderAmount) {