Class MInvoiceTax

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_C_InvoiceTax, I_Persistent, Evaluatee

public class MInvoiceTax extends X_C_InvoiceTax
Invoice Tax Model
Version:
$Id: MInvoiceTax.java,v 1.5 2006/10/06 00:42:24 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, www.arhipac.ro
  • FR [ 2214883 ] Remove SQL code and Replace for Query
  • See Also:
    • Constructor Details

      • MInvoiceTax

        public MInvoiceTax(Properties ctx, String C_InvoiceTax_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        C_InvoiceTax_UU - UUID key
        trxName - Transaction
      • MInvoiceTax

        public MInvoiceTax(Properties ctx, int ignored, String trxName)
        Parameters:
        ctx - context
        ignored - ignored
        trxName - transaction
      • MInvoiceTax

        public MInvoiceTax(Properties ctx, ResultSet rs, String trxName)
        Load Constructor.
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MInvoiceTax

        public MInvoiceTax(MInvoiceTax copy)
        Copy constructor
        Parameters:
        copy -
      • MInvoiceTax

        public MInvoiceTax(Properties ctx, MInvoiceTax copy)
        Copy constructor
        Parameters:
        ctx -
        copy -
      • MInvoiceTax

        public MInvoiceTax(Properties ctx, MInvoiceTax copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Details

      • get

        public static MInvoiceTax get(MInvoiceLine line, int precision, boolean oldTax, String trxName)
        Get Tax Line for Invoice Line
        Parameters:
        line - invoice line
        precision - currency precision
        oldTax - if true old tax is returned
        trxName - transaction name
        Returns:
        existing or new tax
      • getChildTaxes

        public static MInvoiceTax[] getChildTaxes(MInvoiceLine line, int precision, boolean oldTax, String trxName)
        Get Child Tax Lines for Invoice Line
        Parameters:
        line - invoice line
        precision - currency precision
        oldTax - if true old tax is returned
        trxName - transaction name
        Returns:
        array of existing or new tax
      • setPrecision

        protected void setPrecision(int precision)
        Set Precision
        Parameters:
        precision - The precision to set.
      • getTax

        protected MTax getTax()
        Get Tax (immutable)
        Returns:
        tax
      • calculateTaxFromLines

        public boolean calculateTaxFromLines()
        Calculate/Set Tax and Tax Base Amt from Invoice Lines
        Returns:
        true if tax calculated
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_InvoiceTax
        Returns:
        info