Class MBankStatementLine

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

public class MBankStatementLine extends X_C_BankStatementLine
Bank Statement Line Model
Version:
$Id: MBankStatementLine.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $ Carlos Ruiz - globalqss - integrate bug fixing from Teo Sarca [ 1619076 ] Bank statement's StatementDifference becames NULL
Author:
Eldir Tomassen/Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1896880 ] Unlink Payment if TrxAmt is zero
  • BF [ 1896885 ] BS Line: don't update header if after save/delete fails
  • See Also:
    • Field Details

    • Constructor Details

      • MBankStatementLine

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

        public MBankStatementLine(Properties ctx, int C_BankStatementLine_ID, String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        C_BankStatementLine_ID - id
        trxName - transaction
      • MBankStatementLine

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

        public MBankStatementLine(MBankStatement statement)
        Parent Constructor
        Parameters:
        statement - Bank Statement that the line is part of
      • MBankStatementLine

        public MBankStatementLine(MBankStatement statement, int lineNo)
        Parent Constructor
        Parameters:
        statement - Bank Statement that the line is part of
        lineNo - position of the line within the statement
      • MBankStatementLine

        public MBankStatementLine(Properties ctx, int C_BankStatementLine_ID, String trxName, String... virtualColumns)
        Parameters:
        ctx -
        C_BankStatementLine_ID -
        trxName -
        virtualColumns -
    • Method Details

      • setStatementLineDate

        public void setStatementLineDate(Timestamp StatementLineDate)
        Set Statement Line Date and all other dates (Valuta, Acct)
        Specified by:
        setStatementLineDate in interface I_C_BankStatementLine
        Overrides:
        setStatementLineDate in class X_C_BankStatementLine
        Parameters:
        StatementLineDate - date
      • setPayment

        public void setPayment(MPayment payment)
        Set Payment
        Parameters:
        payment - payment
      • addDescription

        public void addDescription(String description)
        Add to Description
        Parameters:
        description - text
      • beforeSave

        protected boolean beforeSave(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - true if it is a new record
        Returns:
        true if record can be saved
      • getParent

        public MBankStatement getParent()
        Get Parent
        Returns:
        parent
      • afterSave

        protected boolean afterSave(boolean newRecord, boolean success)
        Description copied from class: PO
        Called after Save for Post-Save Operation.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - true if it is a new record
        success - true if save operation was success
        Returns:
        if save was a success
      • afterDelete

        protected boolean afterDelete(boolean success)
        Description copied from class: PO
        Execute after Delete operations.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        afterDelete in class PO
        Parameters:
        success - true if record deleted
        Returns:
        true if delete is a success
      • updateHeader

        protected boolean updateHeader()
        Update Header (Bank Statement)
        - Statement difference
        - Ending balance
      • isDateConsistentIfUsedForPosting

        public boolean isDateConsistentIfUsedForPosting()
        If the posting is based on the date of the line (ie SysConfig BANK_STATEMENT_POST_WITH_DATE_FROM_LINE = Y), make sure line and header dates are in the same financial period
        Returns:
        true if not using date from statement line or header and line is in the same financial period
      • isDateConsistentIfUsedForPosting

        public boolean isDateConsistentIfUsedForPosting(Timestamp headerDateAcct)
        If the posting is based on the date of the line (ie SysConfig BANK_STATEMENT_POST_WITH_DATE_FROM_LINE = Y), make sure line and header dates are in the same financial period
        Parameters:
        headerDateAcct -
        Returns:
        true if not using date from statement line or header and line is in the same financial period
      • getC_DepositBatch

        public MDepositBatch getC_DepositBatch() throws RuntimeException
        Specified by:
        getC_DepositBatch in interface I_C_BankStatementLine
        Overrides:
        getC_DepositBatch in class X_C_BankStatementLine
        Throws:
        RuntimeException