Class MAllocationLine

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

public class MAllocationLine extends X_C_AllocationLine
Allocation Line Model
Version:
$Id: MAllocationLine.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MAllocationLine

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

      public MAllocationLine(Properties ctx, int C_AllocationLine_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      C_AllocationLine_ID - id
      trxName - name
    • MAllocationLine

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

      public MAllocationLine(MAllocationHdr parent)
      Parent Constructor
      Parameters:
      parent - parent
    • MAllocationLine

      public MAllocationLine(MAllocationHdr parent, BigDecimal Amount, BigDecimal DiscountAmt, BigDecimal WriteOffAmt, BigDecimal OverUnderAmt)
      Parent Constructor
      Parameters:
      parent - parent
      Amount - amount
      DiscountAmt - optional discount
      WriteOffAmt - optional write off
      OverUnderAmt - over/underpayment
  • Method Details

    • getParent

      public MAllocationHdr getParent()
      Get Parent
      Returns:
      parent
    • setParent

      protected void setParent(MAllocationHdr parent)
      Set Parent
      Parameters:
      parent - parent
    • getDateTrx

      public Timestamp getDateTrx()
      Get Parent Trx Date
      Specified by:
      getDateTrx in interface I_C_AllocationLine
      Overrides:
      getDateTrx in class X_C_AllocationLine
      Returns:
      parent trx date
    • setDocInfo

      public void setDocInfo(int C_BPartner_ID, int C_Order_ID, int C_Invoice_ID)
      Set Document Info
      Parameters:
      C_BPartner_ID - partner
      C_Order_ID - order
      C_Invoice_ID - invoice
    • setPaymentInfo

      public void setPaymentInfo(int C_Payment_ID, int C_CashLine_ID)
      Set Payment Info
      Parameters:
      C_Payment_ID - payment
      C_CashLine_ID - cash line
    • setPaymentInfo

      public void setPaymentInfo(int C_Payment_ID, int C_CashLine_ID, int C_BankTransfer_ID)
      Set Payment Info
      Parameters:
      C_Payment_ID - payment
      C_CashLine_ID - cash line
      C_BankTransfer_ID -
    • getInvoice

      public MInvoice getInvoice()
      Get Invoice
      Returns:
      invoice or null
    • 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
    • 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
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_C_AllocationLine
      Returns:
      info
    • processIt

      protected int processIt(boolean reverse)
      Process Allocation (does not update line).
      - Update and Link Invoice/Payment/Cash.
      Parameters:
      reverse - if true allocation is reversed
      Returns:
      C_BPartner_ID