Class MJournalLine

    • Field Detail

      • m_parent

        protected MJournal m_parent
        Parent
      • m_precision

        protected int m_precision
        Currency Precision
      • m_account

        protected MAccount m_account
        Account Combination
      • m_accountElement

        protected MElementValue m_accountElement
        Account Element
    • Constructor Detail

      • MJournalLine

        public MJournalLine​(Properties ctx,
                            int GL_JournalLine_ID,
                            String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        GL_JournalLine_ID - id
        trxName - transaction
      • MJournalLine

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

        public MJournalLine​(MJournal parent)
        Parent Constructor
        Parameters:
        parent - journal
    • Method Detail

      • getParent

        public MJournal getParent()
        Get Parent
        Returns:
        parent
      • setCurrency

        public void setCurrency​(int C_Currency_ID,
                                int C_ConversionType_ID,
                                BigDecimal CurrencyRate)
        Set Currency Info
        Parameters:
        C_Currency_ID - currenct
        C_ConversionType_ID - type
        CurrencyRate - rate
      • getPrecision

        public int getPrecision()
        Get Currency Precision
        Returns:
        precision
      • setAmtAcct

        public void setAmtAcct​(BigDecimal AmtAcctDr,
                               BigDecimal AmtAcctCr)
        Set Accounted Amounts only if not 0. Amounts overwritten in beforeSave - set conversion rate
        Parameters:
        AmtAcctDr - Dr
        AmtAcctCr - Cr
      • setC_ValidCombination_ID

        public void setC_ValidCombination_ID​(MAccount acct)
        Set C_ValidCombination_ID
        Parameters:
        acct - account
      • getAccount_Combi

        public MAccount getAccount_Combi()
        Get Account (Valid Combination)
        Returns:
        combination or null
      • getAccountElementValue

        public MElementValue getAccountElementValue()
        Get Natural Account Element Value
        Returns:
        account
      • isDocControlled

        public boolean isDocControlled()
        Is it posting to a Control Acct
        Returns:
        true if control acct
      • 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)
        After Save. Update Journal/Batch Total
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - true if new record
        success - true if success
        Returns:
        success
      • afterDelete

        protected boolean afterDelete​(boolean success)
        After Delete
        Overrides:
        afterDelete in class PO
        Parameters:
        success - true if deleted
        Returns:
        true if success
      • updateJournalTotal

        protected boolean updateJournalTotal()
        Update Journal and Batch Total
        Returns:
        true if success
      • getOrCreateCombination

        protected boolean getOrCreateCombination()
        Update combination and optionally
      • fillDimensionsFromCombination

        protected void fillDimensionsFromCombination()
        Fill Accounting Dimensions from line combination