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()
        Before Delete
        Overrides:
        beforeDelete in class PO
        Returns:
        true/false
      • afterDelete

        protected boolean afterDelete(boolean success)
        After Delete
        Overrides:
        afterDelete in class PO
        Parameters:
        success -
        Returns:
        true/false
      • beforeSave

        protected boolean beforeSave(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord -
        Returns:
        true/false
      • afterSave

        protected boolean afterSave(boolean newRecord, boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord -
        success -
        Returns:
        success
      • updateHeader

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