Class MCostHistory

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

public class MCostHistory extends X_M_CostHistory implements ICostInfo
Cost History Model
See Also:
  • Constructor Details

    • MCostHistory

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

      public MCostHistory(Properties ctx, int M_CostHistory_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      M_CostDetail_ID - id
      trxName - trx
    • MCostHistory

      public MCostHistory(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - trx
    • MCostHistory

      public MCostHistory(MCostDetail cd, MCost cost, MCostElement ce)
  • Method Details

    • get

      protected static MCostHistory get(Properties ctx, int AD_Org_ID, int M_CostType_ID, int C_AcctSchema_ID, String costingMethod, int M_CostElement_ID, int M_AttributeSetInstance_ID, MCostDetail cd, String trxName)
      Get Cost History Record by Cost Detail
      Parameters:
      ctx - context
      AD_Org_ID - org
      M_CostType_ID - cost type
      C_AcctSchema_ID - accounting schema
      costingMethod - cost method
      M_CostElement_ID - optional cost element
      M_AttributeSetInstance_ID - asi
      cd - cost detail
      trxName - transaction name
      Returns:
      MCostHistory or null
    • get

      protected static MCostHistory get(Properties ctx, int AD_Client_ID, int AD_Org_ID, int M_Product_ID, int M_CostType_ID, int C_AcctSchema_ID, String costingMethod, int M_CostElement_ID, int M_AttributeSetInstance_ID, Timestamp dateAcct, String trxName)
      Get Cost History Record by Account Date If no cost history record <= account date, simulate using the first cost history record after account date
      Parameters:
      ctx - context
      AD_Client_ID - client
      AD_Org_ID - org
      M_Product_ID - product
      M_CostType_ID - cost type
      C_AcctSchema_ID - as
      costingMethod - costing method
      M_CostElement_ID - optional costing element
      M_AttributeSetInstance_ID - asi
      dateAcct - account date
      trxName - transaction name
      Returns:
      MCostHistory or null
    • getCumulatedAmt

      public BigDecimal getCumulatedAmt()
      Description copied from interface: ICostInfo
      Get Accumulated Amt.
      Specified by:
      getCumulatedAmt in interface ICostInfo
      Returns:
      Total Amount
    • getCumulatedQty

      public BigDecimal getCumulatedQty()
      Description copied from interface: ICostInfo
      Get Accumulated Qty.
      Specified by:
      getCumulatedQty in interface ICostInfo
      Returns:
      Total Quantity
    • getCurrentCostPrice

      public BigDecimal getCurrentCostPrice()
      Description copied from interface: ICostInfo
      Get Current Cost Price.
      Specified by:
      getCurrentCostPrice in interface ICostInfo
      Returns:
      The currently used cost price
    • getCurrentQty

      public BigDecimal getCurrentQty()
      Description copied from interface: ICostInfo
      Get Current Quantity.
      Specified by:
      getCurrentQty in interface ICostInfo
      Returns:
      Current Quantity