Class MDepreciationMethod

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

public class MDepreciationMethod extends X_A_Depreciation_Method implements ImmutablePOSupport
Method of adjusting the difference between depreciation (Calculated) and registered as (booked). ex. MDI, LDI, YDI ...
Author:
Teo Sarca, SC ARHIPAC SERVICE SRL
See Also:
  • Constructor Details

    • MDepreciationMethod

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

      public MDepreciationMethod(Properties ctx, int A_Depreciation_Method_ID, String trxName)
      Parameters:
      ctx -
      A_Depreciation_Method_ID -
      trxName -
    • MDepreciationMethod

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

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

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

      public MDepreciationMethod(Properties ctx, MDepreciationMethod copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • get

      public static MDepreciationMethod get(int A_Depreciation_Method_ID)
      Get MDepreciationMethod from cache (immutable)
      Parameters:
      A_Depreciation_Method_ID -
      Returns:
      MDepreciationMethod
    • get

      public static MDepreciationMethod get(Properties ctx, int A_Depreciation_Method_ID)
      Get MDepreciationMethod from cache (immutable)
      Parameters:
      ctx -
      A_Depreciation_Method_ID -
      Returns:
      MDepreciationMethod
    • get

      public static MDepreciationMethod get(String depreciationType)
      Get MDepreciationMethod from cache
      Parameters:
      depreciationType -
      Returns:
      MDepreciationMethod
    • get

      public static MDepreciationMethod get(Properties ctx, String depreciationType)
      Get MDepreciationMethod from cache (immutable)
      Parameters:
      ctx -
      depreciationType -
      Returns:
      MDepreciationMethod
    • invoke

      public static BigDecimal invoke(Properties ctx, String depreciationType, int A_Asset_ID, BigDecimal A_Asset_Adjustment, int A_PeriodNo, String PostingType, int A_Asset_Acct_ID)
      Invoke depreciation calculation for this method
      Parameters:
      ctx -
      depreciationType -
      A_Asset_ID -
      A_Asset_Adjustment -
      A_PeriodNo -
      PostingType -
      A_Asset_Acct_ID -
      Returns:
      depreciation for current period
    • invoke

      public BigDecimal invoke(MDepreciationWorkfile assetwk, MAssetAcct assetAcct, BigDecimal A_Asset_Adjustment, int A_PeriodNo)
      Calculate adjustment
      Parameters:
      assetwk -
      assetAcct -
      A_Asset_Adjustment -
      A_PeriodNo -
      Returns:
      adjustment to be applied in the specified period
    • invoke

      public BigDecimal invoke(int A_Asset_ID, BigDecimal A_Asset_Adjustment, int A_PeriodNo, String PostingType, int A_Asset_Acct_ID)
      Calculate adjustment
      Parameters:
      A_Asset_ID -
      A_Asset_Adjustment -
      A_PeriodNo -
      PostingType -
      A_Asset_Acct_ID -
      Returns:
      adjustment to be applied in the specified period
    • apply_MDI

      public BigDecimal apply_MDI(int A_Asset_ID, BigDecimal A_Asset_Adjustment, int A_PeriodNo, String PostingType, int A_Asset_Acct_ID)
      MDI - adjustment is made ​​in the current month
      Parameters:
      A_Asset_ID -
      A_Asset_Adjustment -
      A_PeriodNo -
      PostingType -
      A_Asset_Acct_ID -
      Returns:
      adjustment value
    • apply_YDI

      public BigDecimal apply_YDI(int A_Asset_ID, BigDecimal A_Asset_Adjustment, int A_PeriodNo, String PostingType, int A_Asset_Acct_ID)
      YDI - adjustment is made ​​for periods of the year remains
      Parameters:
      A_Asset_ID -
      A_Asset_Adjustment -
      A_PeriodNo -
      PostingType -
      A_Asset_Acct_ID -
      Returns:
      adjustment value
    • apply_LDI

      public BigDecimal apply_LDI(int A_Asset_ID, BigDecimal A_Asset_Adjustment, int A_PeriodNo, String PostingType, int A_Asset_Acct_ID)
      LDI - adjustment is made ​​on the remaining life
      Parameters:
      A_Asset_ID -
      A_Asset_Adjustment -
      A_PeriodNo -
      PostingType -
      A_Asset_Acct_ID -
      Returns:
      adjustment value
    • markImmutable

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