Class MDepreciationExp

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

public class MDepreciationExp extends X_A_Depreciation_Exp
Depreciation expenses
See Also:
  • Constructor Details

    • MDepreciationExp

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

      public MDepreciationExp(Properties ctx, int A_Depreciation_Exp_ID, String trxName)
      Parameters:
      ctx -
      A_Depreciation_Exp_ID -
      trxName -
    • MDepreciationExp

      public MDepreciationExp(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
  • Method Details

    • get

      public static MDepreciationExp get(Properties ctx, int A_Depreciation_Exp_ID)
      Gets depreciation expense from DB
      Parameters:
      ctx - context
      A_Depreciation_Exp_ID - depreciation expense id
      Returns:
      depreciation expense or null if A_Depreciation_Exp_ID=0 or not found
    • createEntry

      public static MDepreciationExp createEntry(Properties ctx, String entryType, int A_Asset_ID, int A_Period, Timestamp DateAcct, String postingType, int drAcct, int crAcct, BigDecimal expense, String description, MDepreciationWorkfile assetwk)
      Create new MDepreciationExp (not save to DB)
      Parameters:
      ctx -
      entryType -
      A_Asset_ID -
      A_Period -
      DateAcct -
      postingType -
      drAcct -
      crAcct -
      expense -
      description -
      assetwk -
      Returns:
      MDepreciationExp
    • updateFrom

      public void updateFrom(MDepreciationWorkfile wk)
      Update fields from asset work file
      Parameters:
      wk - asset work file
    • createDepreciation

      public static Collection<MDepreciationExp> createDepreciation(MDepreciationWorkfile assetwk, int PeriodNo, Timestamp dateAcct, BigDecimal amt, BigDecimal amt_F, BigDecimal accumAmt, BigDecimal accumAmt_F, String help, String trxName)
      Create Depreciation Entries
      Parameters:
      assetwk -
      PeriodNo -
      dateAcct -
      amt -
      amt_F -
      accumAmt -
      accumAmt_F -
      help -
      trxName -
      Returns:
      collection of MDepreciationExp records
    • process

      public void process()
      Process this entry and save the modified workfile.
    • beforeDelete

      protected boolean beforeDelete()
      Description copied from class: PO
      Executed before Delete operation.
      Overrides:
      beforeDelete in class PO
      Returns:
      true if record can be deleted
    • afterDelete

      protected boolean afterDelete(boolean success)
      Description copied from class: PO
      Executed after Delete operation.
      Overrides:
      afterDelete in class PO
      Parameters:
      success - true if record deleted
      Returns:
      true if delete is a success
    • isPosted

      protected boolean isPosted()
      Returns:
      true if posted
    • checkExistsNotProcessedEntries

      public static void checkExistsNotProcessedEntries(Properties ctx, int A_Asset_ID, Timestamp dateAcct, String postingType, String trxName)
      Parameters:
      ctx -
      A_Asset_ID -
      dateAcct -
      postingType -
      trxName -
      Throws:
      org.idempiere.fa.exceptions.AssetException - if there are unprocessed records
    • getNotProcessedEntries

      public static List<MDepreciationExp> getNotProcessedEntries(Properties ctx, int A_Asset_ID, String postingType, String trxName)
      Parameters:
      ctx -
      A_Asset_ID -
      postingType -
      trxName -
      Returns:
      list of not process MDepreciationExp records
    • setProcessed

      public void setProcessed(boolean Processed)
      Description copied from class: X_A_Depreciation_Exp
      Set Processed.
      Specified by:
      setProcessed in interface I_A_Depreciation_Exp
      Overrides:
      setProcessed in class X_A_Depreciation_Exp
      Parameters:
      Processed - The document has been processed
    • toString

      public String toString()
      Description copied from class: PO
      String representation
      Overrides:
      toString in class X_A_Depreciation_Exp
      Returns:
      String representation