Package org.compiere.apps.form
Class PaySelect
java.lang.Object
org.compiere.apps.form.PaySelect
- Direct Known Subclasses:
WPaySelect
Create Manual Payments From (AP) Invoices or (AR) Credit Memos.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final CLogger
Loggerprotected DecimalFormat
Formatprotected boolean
protected boolean
one-To-one payment per invoiceprotected int
Number of selected rowsprotected MPaySelection
Payment Selectionprotected int
Window No -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalculateSelection
(IMiniTable miniTable) Calculate total of selected rows.generatePaySelect
(IMiniTable miniTable, ValueNamePair paymentRule, Timestamp payDate, PaySelect.BankInfo bi) Create Pay Selection (C_PaySelection and C_PaySelectionLine) recordsGet list of active bank account with active C_BankAccountDoc recordsprotected BigDecimal
Get balance of selected bank record (after call togetPaymentRuleData(BankInfo)
)Get list of business partners (C_BPartner_ID, Name) with open vendor invoiceGet document types (C_DocType_ID, Name) for invoice and credit memoGet payment rules that's applicable to bank accountvoid
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 miniTablevoid
prepareTable
(IMiniTable miniTable) SetupColumnInfo
, From and Where clause
-
Field Details
-
m_WindowNo
protected int m_WindowNoWindow No -
m_format
Format -
m_noSelected
protected int m_noSelectedNumber of selected rows -
m_isLocked
protected boolean m_isLocked -
m_ps
Payment Selection -
m_isOnePaymentPerInvoice
protected boolean m_isOnePaymentPerInvoiceone-To-one payment per invoice -
log
Logger
-
-
Constructor Details
-
PaySelect
public PaySelect()
-
-
Method Details
-
getBankAccountData
Get list of active bank account with active C_BankAccountDoc records- Returns:
- list of
PaySelect.BankInfo
-
getBPartnerData
Get list of business partners (C_BPartner_ID, Name) with open vendor invoice- Returns:
- list of business partners
-
getDocTypeData
Get document types (C_DocType_ID, Name) for invoice and credit memo- Returns:
- list of document types
-
prepareTable
SetupColumnInfo
, From and Where clause- Parameters:
miniTable
-
-
getPaymentRuleData
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
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
Get balance of selected bank record (after call togetPaymentRuleData(BankInfo)
)- Returns:
- bank balance
-