Subversion Repositories SmartDukaan

Rev

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

Rev 6750 Rev 6912
Line 389... Line 389...
389
        invoiceTable.addCell(new Phrase("Product Name", helvetica8));
389
        invoiceTable.addCell(new Phrase("Product Name", helvetica8));
390
        invoiceTable.addCell(new Phrase("Quantity", helvetica8));
390
        invoiceTable.addCell(new Phrase("Quantity", helvetica8));
391
        invoiceTable.addCell(new Phrase("Rate", helvetica8));
391
        invoiceTable.addCell(new Phrase("Rate", helvetica8));
392
        invoiceTable.addCell(new Phrase("Amount", helvetica8));
392
        invoiceTable.addCell(new Phrase("Amount", helvetica8));
393
        populateTopInvoiceTable(order, invoiceTable);
393
        populateTopInvoiceTable(order, invoiceTable);
-
 
394
        
-
 
395
        
-
 
396
        if(order.getInsurer() > 0) {
-
 
397
            invoiceTable.addCell(getInsuranceCell(4));
-
 
398
            invoiceTable.addCell(getPriceCell(order.getInsuranceAmount()));
-
 
399
            invoiceTable.addCell(getPriceCell(order.getInsuranceAmount()));
-
 
400
        }
394
 
401
        
395
        invoiceTable.addCell(getTotalCell(4));      
402
        invoiceTable.addCell(getTotalCell(4));      
396
        invoiceTable.addCell(getRupeesCell());
403
        invoiceTable.addCell(getRupeesCell());
397
        invoiceTable.addCell(getTotalAmountCell(order.getTotal_amount()-order.getGvAmount()));
404
        invoiceTable.addCell(getTotalAmountCell(order.getTotal_amount()-order.getGvAmount()));
398
 
405
 
399
        PdfPCell tinCell = new PdfPCell(new Phrase("TIN NO. " + tinNo, helvetica8));
406
        PdfPCell tinCell = new PdfPCell(new Phrase("TIN NO. " + tinNo, helvetica8));
Line 598... Line 605...
598
        
605
        
599
        invoiceTable.addCell(getVATLabelCell(isVAT));
606
        invoiceTable.addCell(getVATLabelCell(isVAT));
600
        invoiceTable.addCell(new Phrase(rate + "%", helvetica8));
607
        invoiceTable.addCell(new Phrase(rate + "%", helvetica8));
601
        invoiceTable.addCell(salesTaxCell);
608
        invoiceTable.addCell(salesTaxCell);
602
        
609
        
-
 
610
        if(order.getInsurer() > 0) {
-
 
611
            invoiceTable.addCell(getInsuranceCell(3));
-
 
612
            invoiceTable.addCell(getPriceCell(order.getInsuranceAmount()));
-
 
613
            invoiceTable.addCell(getPriceCell(order.getInsuranceAmount()));
-
 
614
        }
-
 
615
        
603
        invoiceTable.addCell(getEmptyCell(5));
616
        invoiceTable.addCell(getEmptyCell(5));
604
        
617
        
605
        invoiceTable.addCell(getTotalCell(3));
618
        invoiceTable.addCell(getTotalCell(3));
606
        invoiceTable.addCell(getRupeesCell());
619
        invoiceTable.addCell(getRupeesCell());
607
        invoiceTable.addCell(getTotalAmountCell(orderAmount));
620
        invoiceTable.addCell(getTotalAmountCell(orderAmount));
Line 663... Line 676...
663
        vatCell.setColspan(3);
676
        vatCell.setColspan(3);
664
        vatCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
677
        vatCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
665
        return vatCell;
678
        return vatCell;
666
    }
679
    }
667
    
680
    
-
 
681
    private PdfPCell getInsuranceCell(int colspan) {
-
 
682
        PdfPCell insuranceCell = null;
-
 
683
        insuranceCell = new PdfPCell(new Phrase("1 Year WorldWide Theft Insurance", helvetica8));
-
 
684
        insuranceCell.setColspan(colspan);
-
 
685
        insuranceCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-
 
686
        return insuranceCell;
-
 
687
    }
-
 
688
    
668
    private PdfPCell getEmptyCell(int colspan) {
689
    private PdfPCell getEmptyCell(int colspan) {
669
        PdfPCell emptyCell = new PdfPCell(new Phrase(" ", helvetica8));
690
        PdfPCell emptyCell = new PdfPCell(new Phrase(" ", helvetica8));
670
        emptyCell.setColspan(colspan);
691
        emptyCell.setColspan(colspan);
671
        return emptyCell;
692
        return emptyCell;
672
    }
693
    }