Class MOrderTax

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

public class MOrderTax extends X_C_OrderTax
Order Tax Model
Version:
$Id: MOrderTax.java,v 1.4 2006/07/30 00:51:04 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MOrderTax

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

      public MOrderTax(Properties ctx, int ignored, String trxName)
      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 Details

    • 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 - true to get old tax
      trxName - transaction name
      Returns:
      existing or new tax
    • getChildTaxes

      public static MOrderTax[] getChildTaxes(MOrderLine line, int precision, boolean oldTax, String trxName)
      Get Child Tax Line for Order Line
      Parameters:
      line - Order line
      precision - currency precision
      oldTax - true to get old tax
      trxName - transaction name
      Returns:
      existing or new child tax lines
    • 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
    • toString

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