Class MAssetAddition

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

public class MAssetAddition extends X_A_Asset_Addition implements DocAction
Asset Addition Model
Author:
Teo Sarca, SC ARHIPAC SERVICE SRL TODO: BUG: REG in depexp creates a zero if they have more sites Addition during 0?!
See Also:
  • Constructor Details

    • MAssetAddition

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

      public MAssetAddition(Properties ctx, int A_Asset_Addition_ID, String trxName)
      Parameters:
      ctx -
      A_Asset_Addition_ID -
      trxName -
    • MAssetAddition

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

    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new record
      Returns:
      true if record can be saved
    • createAsset

      public static MAssetAddition createAsset(MMatchInv match)
      Create Asset and asset Addition from MMatchInv. MAssetAddition is saved.
      Parameters:
      match - match invoice
      Returns:
      asset addition
    • createAsset

      public static MAssetAddition createAsset(MIFixedAsset ifa)
      Create Asset and asset Addition from MIFixedAsset. MAssetAddition is saved. (@win note, not referenced from anywhere. incomplete feature)
      Parameters:
      ifa -
      Returns:
      asset addition
    • createAsset

      public static MAssetAddition createAsset(MProject project, MProduct product)
      Create Asset and asset Addition from MProject. MAssetAddition is saved. Addition from Project only allows initial addition (will definitely create new asset)
      Parameters:
      project -
      Returns:
      asset addition
    • getC_Project

      public MProject getC_Project(boolean requery)
      Parameters:
      requery -
      Returns:
      MProject
    • setM_MatchInv

      public static boolean setM_MatchInv(SetGetModel model, int M_MatchInv_ID)
      Copy fields from MatchInv+InvoiceLine+InOutLine
      Parameters:
      model - - to copy from
      M_MatchInv_ID - - matching invoice id
    • getI_FixedAsset

      public MIFixedAsset getI_FixedAsset(boolean requery)
      Parameters:
      requery -
      Returns:
      MIFixedAsset
    • setSourceAmt

      public void setSourceAmt(BigDecimal amt)
      Set source amount
      Parameters:
      amt -
    • setIsApproved

      public void setIsApproved()
      Set IsApproved to true if current role can approved it, false otherwise.
    • getDateAcct

      public Timestamp getDateAcct()
      Description copied from class: X_A_Asset_Addition
      Get Account Date.
      Specified by:
      getDateAcct in interface I_A_Asset_Addition
      Overrides:
      getDateAcct in class X_A_Asset_Addition
      Returns:
      Accounting Date
    • processIt

      public boolean processIt(String processAction)
      Description copied from interface: DocAction
      Process document
      Specified by:
      processIt in interface DocAction
      Parameters:
      processAction - document action
      Returns:
      true if performed
    • unlockIt

      public boolean unlockIt()
      Description copied from interface: DocAction
      Unlock Document.
      Specified by:
      unlockIt in interface DocAction
      Returns:
      true if success
    • invalidateIt

      public boolean invalidateIt()
      Description copied from interface: DocAction
      Invalidate Document
      Specified by:
      invalidateIt in interface DocAction
      Returns:
      true if success
    • prepareIt

      public String prepareIt()
      Description copied from interface: DocAction
      Prepare Document
      Specified by:
      prepareIt in interface DocAction
      Returns:
      new status (In Progress or Invalid)
    • approveIt

      public boolean approveIt()
      Description copied from interface: DocAction
      Approve Document
      Specified by:
      approveIt in interface DocAction
      Returns:
      true if success
    • rejectIt

      public boolean rejectIt()
      Description copied from interface: DocAction
      Reject Approval
      Specified by:
      rejectIt in interface DocAction
      Returns:
      true if success
    • completeIt

      public String completeIt()
      Description copied from interface: DocAction
      Complete Document
      Specified by:
      completeIt in interface DocAction
      Returns:
      new status (Complete, In Progress, Invalid, Waiting ..)
    • voidIt

      public boolean voidIt()
      Description copied from interface: DocAction
      Void Document
      Specified by:
      voidIt in interface DocAction
      Returns:
      true if success
    • closeIt

      public boolean closeIt()
      Description copied from interface: DocAction
      Close Document
      Specified by:
      closeIt in interface DocAction
      Returns:
      true if success
    • reverseCorrectIt

      public boolean reverseCorrectIt()
      Description copied from interface: DocAction
      Reverse Correction
      Specified by:
      reverseCorrectIt in interface DocAction
      Returns:
      true if success
    • reverseAccrualIt

      public boolean reverseAccrualIt()
      Description copied from interface: DocAction
      Reverse Accrual
      Specified by:
      reverseAccrualIt in interface DocAction
      Returns:
      true if success
    • reActivateIt

      public boolean reActivateIt()
      Description copied from interface: DocAction
      Re-activate
      Specified by:
      reActivateIt in interface DocAction
      Returns:
      true if success
    • getSummary

      public String getSummary()
      Description copied from interface: DocAction
      Get Summary
      Specified by:
      getSummary in interface DocAction
      Returns:
      Summary of Document
    • getProcessMsg

      public String getProcessMsg()
      Description copied from interface: DocAction
      Get Process Message
      Specified by:
      getProcessMsg in interface DocAction
      Returns:
      clear text message
    • getDoc_User_ID

      public int getDoc_User_ID()
      Description copied from interface: DocAction
      Get Document Owner
      Specified by:
      getDoc_User_ID in interface DocAction
      Returns:
      AD_User_ID
    • getApprovalAmt

      public BigDecimal getApprovalAmt()
      Description copied from interface: DocAction
      Get Document Approval Amount
      Specified by:
      getApprovalAmt in interface DocAction
      Returns:
      amount
    • getA_Asset

      public MAsset getA_Asset(boolean requery)
      Get Asset
      Parameters:
      requery -
      Returns:
      asset
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - new record
      success - true if save operation was success
      Returns:
      if save was a success
    • hasZeroValues

      public boolean hasZeroValues()
      Returns:
      true if assert value <= 0
    • createPDF

      public File createPDF()
      Description copied from interface: DocAction
      Create PDF
      Specified by:
      createPDF in interface DocAction
      Returns:
      file
    • getDocumentInfo

      public String getDocumentInfo()
      Description copied from interface: DocAction
      Get Document Info
      Specified by:
      getDocumentInfo in interface DocAction
      Returns:
      Type and Document No
    • toString

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