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.tax;
2
 
3
import com.spice.profitmandi.common.model.CustomOrderItem;
4
 
5
import java.util.List;
6
 
7
/**
8
 * Renders the tax portion of the item table in the folded style (rate folded into each amount
9
 * cell). The state axis is the extension point: {@link IntraStateTaxColumns} emits CGST + SGST,
10
 * {@link InterStateTaxColumns} emits IGST. Adding a new tax presentation (e.g. UTGST, cess) means
11
 * adding an implementation here — no section or document change.
12
 */
13
public interface TaxColumns {
14
 
15
    /** Column header labels, one per tax column (e.g. {@code ["CGST","SGST"]} or {@code ["IGST"]}). */
16
    List<String> headerLabels();
17
 
18
    /** Per-line cells, one per tax column, each amount with its rate folded below. */
19
    List<String> lineCells(CustomOrderItem item);
20
 
21
    /** Adds this line's tax amounts to the running totals. */
22
    void accumulate(TaxTotals totals, CustomOrderItem item);
23
 
24
    /** Total-row cells, one per tax column. */
25
    List<String> totalCells(TaxTotals totals);
26
}