Class PaySelect

java.lang.Object
org.compiere.apps.form.PaySelect
Direct Known Subclasses:
WPaySelect

public class PaySelect extends Object
Create Manual Payments From (AP) Invoices or (AR) Credit Memos.
  • Field Details

    • m_WindowNo

      protected int m_WindowNo
      Window No
    • m_format

      protected DecimalFormat m_format
      Format
    • m_noSelected

      protected int m_noSelected
      Number of selected rows
    • m_isLocked

      protected boolean m_isLocked
    • m_ps

      protected MPaySelection m_ps
      Payment Selection
    • m_isOnePaymentPerInvoice

      protected boolean m_isOnePaymentPerInvoice
      one-To-one payment per invoice
    • log

      protected static final CLogger log
      Logger
  • Constructor Details

    • PaySelect

      public PaySelect()
  • Method Details

    • getBankAccountData

      public ArrayList<PaySelect.BankInfo> getBankAccountData()
      Get list of active bank account with active C_BankAccountDoc records
      Returns:
      list of PaySelect.BankInfo
    • getBPartnerData

      public ArrayList<KeyNamePair> getBPartnerData()
      Get list of business partners (C_BPartner_ID, Name) with open vendor invoice
      Returns:
      list of business partners
    • getDocTypeData

      public ArrayList<KeyNamePair> getDocTypeData()
      Get document types (C_DocType_ID, Name) for invoice and credit memo
      Returns:
      list of document types
    • prepareTable

      public void prepareTable(IMiniTable miniTable)
      Setup ColumnInfo, From and Where clause
      Parameters:
      miniTable -
    • getPaymentRuleData

      public ArrayList<ValueNamePair> getPaymentRuleData(PaySelect.BankInfo bi)
      Get payment rules that's applicable to bank account
      Parameters:
      bi -
      Returns:
      list of applicable payment rules
    • loadTableInfo

      public void loadTableInfo(PaySelect.BankInfo bi, Timestamp payDate, ValueNamePair paymentRule, boolean onlyDue, boolean onlyPositiveBalance, KeyNamePair bpartner, KeyNamePair docType, IMiniTable miniTable)
      Load open invoice and credit memo documents into miniTable
      Parameters:
      bi -
      payDate -
      paymentRule -
      onlyDue -
      onlyPositiveBalance -
      bpartner -
      docType -
      miniTable -
    • calculateSelection

      public String calculateSelection(IMiniTable miniTable)
      Calculate total of selected rows.
      Parameters:
      miniTable -
      Returns:
      info message
    • generatePaySelect

      public String generatePaySelect(IMiniTable miniTable, ValueNamePair paymentRule, Timestamp payDate, PaySelect.BankInfo bi)
      Create Pay Selection (C_PaySelection and C_PaySelectionLine) records
      Parameters:
      miniTable -
      paymentRule -
      payDate -
      bi -
      Returns:
      error message (if any)
    • getBankBalance

      protected BigDecimal getBankBalance()
      Get balance of selected bank record (after call to getPaymentRuleData(BankInfo))
      Returns:
      bank balance