Class MOrderTax

    • Constructor Detail

      • MOrderTax

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

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

      • get

        public static MOrderTax get​(MOrderLine line,
                                    int precision,
                                    boolean oldTax,
                                    String trxName)
        Get Tax Line for Order Line
        Parameters:
        line - Order line
        precision - currency precision
        oldTax - get old tax
        trxName - transaction
        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 Amt from Order Lines
        Returns:
        true if calculated