Class MPaySelectionCheck

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

public class MPaySelectionCheck extends X_C_PaySelectionCheck
Payment Print/Export model.
Version:
$Id: MPaySelectionCheck.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MPaySelectionCheck

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

      public MPaySelectionCheck(Properties ctx, int C_PaySelectionCheck_ID, String trxName)
      Parameters:
      ctx - context
      C_PaySelectionCheck_ID - C_PaySelectionCheck_ID
      trxName - transaction
    • MPaySelectionCheck

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

      public MPaySelectionCheck(MPaySelectionLine line, String PaymentRule)
      Create from Payment Selection Line
      Parameters:
      line - payment selection line
      PaymentRule - payment rule (PAYMENTRULE_*)
    • MPaySelectionCheck

      public MPaySelectionCheck(MPaySelection ps, String PaymentRule)
      Create from Pay Selection
      Parameters:
      ps - payment selection
      PaymentRule - payment rule (PAYMENTRULE_*)
  • Method Details

    • getOfPayment

      public static MPaySelectionCheck getOfPayment(Properties ctx, int C_Payment_ID, String trxName)
      Get Pay Selection Check for Payment
      Parameters:
      ctx - context
      C_Payment_ID - id
      trxName - transaction
      Returns:
      pay selection check for payment or null
    • createForPayment

      public static MPaySelectionCheck createForPayment(Properties ctx, int C_Payment_ID, String trxName)
      Create Pay Selection and Pay Selection Check for Payment
      Parameters:
      ctx - context
      C_Payment_ID - id
      trxName - transaction
      Returns:
      MPaySelectionCheck for payment or null
    • get

      public static MPaySelectionCheck[] get(int C_PaySelection_ID, String PaymentRule, String trxName)
      Get Pay Selection Check records
      Parameters:
      C_PaySelection_ID - Payment Selection
      PaymentRule - Payment Rule
      trxName - transaction
      Returns:
      array of MPaySelectionCheck
    • get

      public static MPaySelectionCheck[] get(int C_PaySelection_ID, String PaymentRule, int startDocumentNo, String trxName)
      Get Payment Selection Check records and set new Check Document No.
      Parameters:
      C_PaySelection_ID - Payment Selection
      PaymentRule - Payment Rule
      startDocumentNo - starting document no
      trxName - transaction
      Returns:
      array of MPaySelectionCheck
    • confirmPrint

      public static void confirmPrint(MPaySelectionCheck check, MPaymentBatch batch)
      Confirm Print for a payment selection check record. Create Payment if not created yet (i.e check.getC_Payment_ID() == 0).
      Parameters:
      check - check
      batch - batch
    • confirmPrint

      public static int confirmPrint(MPaySelectionCheck[] checks, MPaymentBatch batch, boolean createDepositBatch)
      Confirm Print for payment selection check records.
      For each payment selection check record, call confirmPrint(MPaySelectionCheck, MPaymentBatch).
      Parameters:
      checks - checks
      batch - batch
      createDepositBatch - create deposit batch
      Returns:
      last Document number or 0 if nothing printed
    • confirmPrint

      public static int confirmPrint(MPaySelectionCheck[] checks, MPaymentBatch batch)
      Parameters:
      checks - checks
      batch - batch
      Returns:
      last Document number or 0 if nothing printed
    • addLine

      public void addLine(MPaySelectionLine line)
      Add Payment Selection Line
      Parameters:
      line - Payment Selection Line
    • getParent

      public MPaySelection getParent()
      Get Parent
      Returns:
      parent MPaySelection record
    • isValid

      public boolean isValid()
      Is this a valid Prepared Payment
      Returns:
      true if valid
    • isDirect

      public boolean isDirect()
      Is this with Direct Debit or Direct Deposit payment rule
      Returns:
      true if is with Direct Debit or Direct Deposit payment rule
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_C_PaySelectionCheck
      Returns:
      info
    • getPaySelectionLines

      public MPaySelectionLine[] getPaySelectionLines(boolean requery)
      Get Payment Selection Lines
      Parameters:
      requery - true to re-query from DB
      Returns:
      array of payment selection lines
    • deleteGeneratedDraft

      public static boolean deleteGeneratedDraft(Properties ctx, int C_Payment_ID, String trxName)
      Delete Payment Selection records that are generated as Draft (Print Preview)
      Parameters:
      ctx - context
      C_Payment_ID - id
      trxName - transaction
      Returns:
      false if there are errors