Class MAsset

    • Field Detail

      • CHANGETYPE_setAssetGroup

        public static final int CHANGETYPE_setAssetGroup
        ChangeType - Asset Group changed
        See Also:
        Constant Field Values
    • Constructor Detail

      • MAsset

        public MAsset​(Properties ctx,
                      int A_Asset_ID,
                      String trxName)
        Create constructor
      • MAsset

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

        protected MAsset​(MMatchInv match)
        Construct from MMatchInv
        Parameters:
        match - match invoice
      • MAsset

        protected MAsset​(MIFixedAsset ifa)
        Construct from MIFixedAsset (import)
        Parameters:
        ifa -
      • MAsset

        protected MAsset​(MProject project)
        author Edwin Ang
        Parameters:
        project -
      • MAsset

        public MAsset​(MInOut mInOut,
                      MInOutLine sLine,
                      int deliveryCount)
      • MAsset

        public MAsset​(MAsset copy)
        Parameters:
        copy -
      • MAsset

        public MAsset​(Properties ctx,
                      MAsset copy)
        Parameters:
        ctx -
        copy -
    • Method Detail

      • get

        public static MAsset get​(Properties ctx,
                                 int A_Asset_ID,
                                 String trxName)
        Get Asset
        Parameters:
        ctx - context
        A_Asset_ID - asset
        trxName -
      • forASI

        public static Collection<MAsset> forASI​(Properties ctx,
                                                int M_Product_ID,
                                                int M_ASI_ID)
        Get Assets from given M_Product_ID and M_ASI_ID.

        Note: The A_Asset_Product table is not checked !!!

        Parameters:
        ctx -
        M_Product_ID - (optional)
        M_ASI_ID -
        Returns:
        array of MAsset
      • setAssetGroup

        public void setAssetGroup​(MAssetGroup assetGroup)
        Set Asset Group; also it sets other default fields
        Parameters:
        assetGroup -
      • setASI

        public void setASI​(MAttributeSetInstance asi)
        Set ASI Info (M_AttributeSetInstance_ID, Lot, SerNo)
        Parameters:
        asi -
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • 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
      • 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
      • changeStatus

        public void changeStatus​(String newStatus,
                                 Timestamp date)
        Change asset status to newStatus
        Parameters:
        newStatus - see A_ASSET_STATUS_
        date - state change date; if null context "#Date" will be used
      • getUseLifeMonths_F

        public int getUseLifeMonths_F()
      • setUseLifeMonths_F

        public void setUseLifeMonths_F​(int UseLifeMonths_F)
      • getA_Current_Period

        public int getA_Current_Period()
      • setA_Current_Period

        public void setA_Current_Period​(int A_Current_Period)
      • getDateAcct

        public Timestamp getDateAcct()
      • setDateAcct

        public void setDateAcct​(Timestamp DateAcct)
      • getA_Depreciation_ID

        public int getA_Depreciation_ID()
      • setA_Depreciation_ID

        public void setA_Depreciation_ID​(int A_Depreciation_ID)
      • getA_Depreciation_F_ID

        public int getA_Depreciation_F_ID()
      • setA_Depreciation_F_ID

        public void setA_Depreciation_F_ID​(int A_Depreciation_F_ID)
      • getA_Asset_Cost

        public BigDecimal getA_Asset_Cost()
      • setA_Asset_Cost

        public void setA_Asset_Cost​(BigDecimal A_Asset_Cost)
      • getA_Accumulated_Depr

        public BigDecimal getA_Accumulated_Depr()
      • setA_Accumulated_Depr

        public void setA_Accumulated_Depr​(BigDecimal A_Accumulated_Depr)
      • getA_Accumulated_Depr_F

        public BigDecimal getA_Accumulated_Depr_F()
      • setA_Accumulated_Depr_F

        public void setA_Accumulated_Depr_F​(BigDecimal A_Accumulated_Depr_F)
      • setI_FixedAsset

        public void setI_FixedAsset​(MIFixedAsset I_FixedAsset)
      • confirmDelivery

        public MAssetDelivery confirmDelivery​(javax.servlet.http.HttpServletRequest request,
                                              int ad_User_ID)
      • getProductR_MailText_ID

        public int getProductR_MailText_ID()
      • isDownloadable

        public boolean isDownloadable()