Class MPaymentTerm

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

public class MPaymentTerm extends X_C_PaymentTerm
Payment Term Model
Version:
$Id: MPaymentTerm.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke, Cristina Ghita, www.arhipac.ro
  • BF [ 2889886 ] Net days in payment term https://sourceforge.net/p/adempiere/bugs/2194/
  • See Also:
    • Constructor Details

      • MPaymentTerm

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

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

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

      • getSchedule

        public MPaySchedule[] getSchedule(boolean requery)
        Get Payment Schedule
        Parameters:
        requery - if true re-query
        Returns:
        array of pay schedule
      • validate

        public String validate()
        Validate Payment Term and Schedule. Update IsValid flag with validation result.
        Returns:
        Validation Message @OK@ or error
      • apply

        public boolean apply(int C_Invoice_ID)
        Apply Payment Term to Invoice -
        Parameters:
        C_Invoice_ID - invoice
        Returns:
        true if payment schedule is valid
      • apply

        public boolean apply(MInvoice invoice)
        Apply Payment Term to Invoice
        Parameters:
        invoice - invoice
        Returns:
        true if payment schedule is valid
      • applyOrder

        public boolean applyOrder(int C_Order_ID)
        Apply Payment Term to Order -
        Parameters:
        C_Order_ID - order
        Returns:
        true if payment schedule is valid
      • applyOrder

        public boolean applyOrder(MOrder order)
        Apply Payment Term to Order
        Parameters:
        order - order
        Returns:
        true if payment schedule is valid
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_PaymentTerm
        Returns:
        info
      • 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