Class MAssetAcct

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

public class MAssetAcct extends X_A_Asset_Acct implements ImmutablePOSupport
Asset Acct Model
Author:
Teo Sarca, SC ARHIPAC SERVICE SRL
See Also:
  • Constructor Details

    • MAssetAcct

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

      public MAssetAcct(Properties ctx, int X_A_Asset_Acct_ID, String trxName)
      DO NOT USE DIRECTLY
    • MAssetAcct

      public MAssetAcct(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
    • MAssetAcct

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

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

      public MAssetAcct(Properties ctx, MAssetAcct copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
    • MAssetAcct

      public MAssetAcct(MAsset asset, MAssetGroupAcct assetgrpacct)
      Create new asset accounting from asset group accounting
      Parameters:
      asset - asset
      assetgrpacct - asset group accounting
  • Method Details

    • get

      public static MAssetAcct get(int A_Asset_Acct_ID)
      Get Asset Accounting (from cache) (immutable)
      Parameters:
      A_Asset_Acct_ID - asset accounting id
      Returns:
      asset accounting or null if not found
    • get

      public static MAssetAcct get(Properties ctx, int A_Asset_Acct_ID)
      Get Asset Accounting (from cache) (immutable)
      Parameters:
      ctx - context
      A_Asset_Acct_ID - asset accounting id
      Returns:
      asset accounting or null if not found
    • forA_Asset_ID

      public static MAssetAcct forA_Asset_ID(Properties ctx, int C_AcctSchema_ID, int A_Asset_ID, String postingType, Timestamp dateAcct, String trxName)
      Get asset accounting.
      Parameters:
      ctx - context
      A_Asset_ID - asset
      postingType - Posting type
      dateAcct - check ValidFrom
      Returns:
      asset accounting for the given asset
    • getA_Depreciation_Variable_Perc

      public BigDecimal getA_Depreciation_Variable_Perc(boolean fiscal)
      Parameters:
      fiscal - true for fiscal, false for non-fiscal
      Returns:
      depreciation variable percentage
    • getC_AcctSchema

      public MAcctSchema getC_AcctSchema()
      Specified by:
      getC_AcctSchema in interface I_A_Asset_Acct
      Overrides:
      getC_AcctSchema in class X_A_Asset_Acct
    • getP_Asset_Acct

      public MAccount getP_Asset_Acct(int M_Product_ID)
      Parameters:
      M_Product_ID -
      Returns:
      Product asset account
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • markImmutable

      public MAssetAcct markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO