Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37066 amit 1
package com.spice.profitmandi.common.document;
2
 
3
import com.itextpdf.text.Document;
4
 
5
/**
6
 * Per-document mutable state threaded through the sections during a single render. Holds the open
7
 * iText {@link Document}, the normalized {@link DocumentData}, and the running totals that the item
8
 * table accumulates and the summary section reads back.
9
 */
10
public class PdfContext {
11
 
12
    private final Document document;
13
    private final DocumentData data;
14
 
15
    // Running totals accumulated by ItemsTableSection, consumed by SummarySection.
16
    public float totalTaxable;
17
    public float totalTaxAmount;
18
    public float totalNetAmount;
19
    public float totalGrossSale;
20
    public float totalCgst;
21
    public float totalSgst;
22
    public float totalIgst;
23
    public float totalInvoiceValue;
24
 
25
    public PdfContext(Document document, DocumentData data) {
26
        this.document = document;
27
        this.data = data;
28
    }
29
 
30
    public Document document() { return document; }
31
    public DocumentData data() { return data; }
32
}