Class MInvoiceTax

    • Constructor Detail

      • MInvoiceTax

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

        public MInvoiceTax​(Properties ctx,
                           ResultSet rs,
                           String trxName)
        Load Constructor. Set Precision and TaxIncluded for tax calculations!
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MInvoiceTax

        public MInvoiceTax​(MInvoiceTax copy)
        Parameters:
        copy -
    • Method Detail

      • 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
      • 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 Base Amt from Invoice Lines
        Returns:
        true if tax calculated