Class MAccount

    • Constructor Detail

      • MAccount

        public MAccount​(Properties ctx,
                        int C_ValidCombination_ID,
                        String trxName)
        Default constructor
        Parameters:
        ctx - context
        C_ValidCombination_ID - combination
        trxName - transaction
      • MAccount

        public MAccount​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Load constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MAccount

        public MAccount​(MAcctSchema as)
        Parent Constructor
        Parameters:
        as - account schema
      • MAccount

        public MAccount​(MAccount copy)
        Parameters:
        copy -
    • Method Detail

      • get

        @Deprecated
        public static MAccount get​(Properties ctx,
                                   int ad_Client_ID,
                                   int ad_Org_ID,
                                   int c_AcctSchema_ID,
                                   int new_account_id,
                                   int c_SubAcct_ID,
                                   int m_Product_ID,
                                   int c_BPartner_ID,
                                   int ad_OrgTrx_ID,
                                   int c_LocFrom_ID,
                                   int c_LocTo_ID,
                                   int c_SalesRegion_ID,
                                   int c_Project_ID,
                                   int c_Campaign_ID,
                                   int c_Activity_ID,
                                   int user1_ID,
                                   int user2_ID,
                                   int userElement1_ID,
                                   int userElement2_ID)
        Deprecated.
      • get

        public static MAccount get​(Properties ctx,
                                   int AD_Client_ID,
                                   int AD_Org_ID,
                                   int C_AcctSchema_ID,
                                   int Account_ID,
                                   int C_SubAcct_ID,
                                   int M_Product_ID,
                                   int C_BPartner_ID,
                                   int AD_OrgTrx_ID,
                                   int C_LocFrom_ID,
                                   int C_LocTo_ID,
                                   int C_SalesRegion_ID,
                                   int C_Project_ID,
                                   int C_Campaign_ID,
                                   int C_Activity_ID,
                                   int User1_ID,
                                   int User2_ID,
                                   int UserElement1_ID,
                                   int UserElement2_ID,
                                   String trxName)
        Get existing Account or create it
        Parameters:
        ctx - context
        AD_Client_ID -
        AD_Org_ID -
        C_AcctSchema_ID -
        Account_ID -
        C_SubAcct_ID -
        M_Product_ID -
        C_BPartner_ID -
        AD_OrgTrx_ID -
        C_LocFrom_ID -
        C_LocTo_ID -
        C_SalesRegion_ID -
        C_Project_ID -
        C_Campaign_ID -
        C_Activity_ID -
        User1_ID -
        User2_ID -
        UserElement1_ID -
        UserElement2_ID -
        trxName -
        Returns:
        account or null
      • get

        public static MAccount get​(Properties ctx,
                                   int C_AcctSchema_ID,
                                   String alias)
        Get first with Alias
        Parameters:
        ctx - context
        C_AcctSchema_ID - as
        alias - alias
        Returns:
        account
      • get

        public static MAccount get​(X_Fact_Acct fa)
        Get from existing Accounting fact
        Parameters:
        fa - accounting fact
        Returns:
        account
      • getDefault

        public static MAccount getDefault​(Properties ctx,
                                          int C_AcctSchema_ID,
                                          boolean optionalNull,
                                          String trxName)
        Factory: default combination
        Parameters:
        ctx - context
        C_AcctSchema_ID - accounting schema
        optionalNull - if true the optional values are null
        trxName - transaction
        Returns:
        Account
      • getDefault

        public static MAccount getDefault​(MAcctSchema acctSchema,
                                          boolean optionalNull)
        Factory: default combination
        Parameters:
        acctSchema - accounting schema
        optionalNull - if true, the optional values are null
        Returns:
        Account
      • get

        public static MAccount get​(int C_ValidCombination_ID)
        Get Account from cache (immutable)
        Parameters:
        C_ValidCombination_ID - combination
        Returns:
        Account
      • get

        public static MAccount get​(Properties ctx,
                                   int C_ValidCombination_ID)
        Get Account from cache (immutable)
        Parameters:
        ctx - context
        C_ValidCombination_ID - combination
        Returns:
        Immutable instance of Account
      • updateValueDescription

        public static void updateValueDescription​(Properties ctx,
                                                  String where,
                                                  String trxName)
        Update Value/Description after change of account element value/description.
        Parameters:
        ctx - context
        where - where clause
        trxName - transaction
      • getAccountType

        public String getAccountType()
        Get Account Type
        Returns:
        Account Type of Account Element
      • isBalanceSheet

        public boolean isBalanceSheet()
        Is this a Balance Sheet Account
        Returns:
        boolean
      • isActiva

        public boolean isActiva()
        Is this an Activa Account
        Returns:
        boolean
      • isPassiva

        public boolean isPassiva()
        Is this a Passiva Account
        Returns:
        boolean
      • setValueDescription

        public void setValueDescription()
        Set Value and Description and Fully Qualified Flag for Combination
      • validate

        public boolean validate()
        Validate combination
        Returns:
        true if valid
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • main

        public static void main​(String[] args)
        Test
        Parameters:
        args -