Class MCashLine

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

public class MCashLine extends X_C_CashLine
Cash Line Model
Version:
$Id: MCashLine.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1760240 ] CashLine bank account is filled even if is not bank transfer
  • BF [ 1918266 ] MCashLine.updateHeader should ignore not active lines
  • BF [ 1918290 ] MCashLine.createReversal should inactivate if not processed
  • See Also:
    • Field Details

      • m_parent

        protected MCash m_parent
        Parent
      • m_bankAccount

        protected MBankAccount m_bankAccount
        Bank Account
      • m_invoice

        protected MInvoice m_invoice
        Invoice
    • Constructor Details

      • MCashLine

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

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

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

        public MCashLine(MCash cash)
        Parent Constructor
        Parameters:
        cash - parent
      • MCashLine

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

      • addDescription

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

        public void setInvoice(MInvoice invoice)
        Set Invoice - no discount
        Parameters:
        invoice - invoice
      • setOrder

        public void setOrder(MOrder order, String trxName)
        Set Order - no discount
        Parameters:
        order - order
        trxName - transaction
      • getStatementDate

        public Timestamp getStatementDate()
        Get Statement Date from header
        Returns:
        date
      • createReversal

        public MCashLine createReversal()
        Create Line Reversal or inactivate this line if it is not processed
        Returns:
        new reversed CashLine or this instance if not processed
      • getParent

        public MCash getParent()
        Get MCash (parent)
        Returns:
        MCash
      • getCashBook

        public MCashBook getCashBook()
        Get CashBook
        Returns:
        cash book
      • getBankAccount

        public MBankAccount getBankAccount()
        Get Bank Account
        Returns:
        bank account
      • getInvoice

        public MInvoice getInvoice()
        Get Invoice
        Returns:
        invoice
      • beforeDelete

        protected boolean beforeDelete()
        Description copied from class: PO
        Execute before Delete operations.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        beforeDelete in class PO
        Returns:
        true if record can be deleted
      • 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
      • 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
      • 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
      • updateHeader

        protected boolean updateHeader()
        Update Cash Header (C_Cash).
        - Statement Difference, Ending Balance.
        Returns:
        true if success