Subversion Repositories SmartDukaan

Rev

Rev 35799 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35799 Rev 36037
Line 33... Line 33...
33
        // ===== HEADER =====
33
        // ===== HEADER =====
34
        addIfNotEmpty(lines, center(safe(invoice.getTitle()), lineWidth));
34
        addIfNotEmpty(lines, center(safe(invoice.getTitle()), lineWidth));
35
        if (invoice.isCancelled()) {
35
        if (invoice.isCancelled()) {
36
            lines.add(center("*** INVOICE CANCELLED ***", lineWidth));
36
            lines.add(center("*** INVOICE CANCELLED ***", lineWidth));
37
        }
37
        }
-
 
38
        String docLabel = invoice.getTitle() != null && invoice.getTitle().toLowerCase().contains("challan") ? "DC No" : "Invoice No";
38
        addIfNotEmpty(lines, center("Invoice No: " + safe(invoice.getInvoiceNumber()), lineWidth));
39
        addIfNotEmpty(lines, center(docLabel + ": " + safe(invoice.getInvoiceNumber()), lineWidth));
39
        addIfNotEmpty(lines, center("Date: " + safe(invoice.getInvoiceDate()), lineWidth));
40
        addIfNotEmpty(lines, center("Date: " + safe(invoice.getInvoiceDate()), lineWidth));
40
        lines.add(repeat('-', lineWidth));
41
        lines.add(repeat('-', lineWidth));
41
 
42
 
42
        // ===== CUSTOMER =====
43
        // ===== CUSTOMER =====
43
        CustomCustomer c = invoice.getCustomer();
44
        CustomCustomer c = invoice.getCustomer();