|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.model.PO
org.compiere.model.X_C_Payment
org.compiere.model.MPayment
public final class MPayment
Payment Model. - retrieve and create payments for invoice
Event chain
- Payment inserted
C_Payment_Trg fires
update DocumentNo with payment summary
- Payment posted (C_Payment_Post)
create allocation line
C_Allocation_Trg fires
Update C_BPartner Open Item Amount
update invoice (IsPaid)
link invoice-payment if batch
Lifeline:
- Created by VPayment or directly
- When changed in VPayment
- old payment is reversed
- new payment created
When Payment is posed, the Allocation is made
http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962,
Serialized Form| Field Summary | |
|---|---|
static String |
REVERSE_INDICATOR
Reversal Indicator |
| Fields inherited from class org.compiere.model.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MPayment(Properties ctx,
int C_Payment_ID,
String trxName)
Default Constructor |
|
MPayment(Properties ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
void |
addDescription(String description)
Add to Description |
boolean |
allocateIt()
Allocate It. |
boolean |
approveIt()
Approve Document |
protected boolean |
beforeSave(boolean newRecord)
Before Save |
boolean |
closeIt()
Close Document. |
String |
completeIt()
Complete Document |
File |
createPDF()
Create PDF |
File |
createPDF(File file)
Create PDF file |
BigDecimal |
getAllocatedAmt()
Get Allocated Amt in Payment Currency |
BigDecimal |
getApprovalAmt()
Get Document Approval Amount |
String |
getCreditCardExp(String delimiter)
CreditCard Exp MMYY |
String |
getCreditCardName()
Get Name of Credit Card |
String |
getCreditCardName(String CreditCardType)
Get Name of Credit Card |
ValueNamePair[] |
getCreditCards()
Get Accepted Credit Cards for PayAmt (default 0) |
ValueNamePair[] |
getCreditCards(BigDecimal amt)
Get Accepted Credit Cards for amount |
String |
getCurrencyISO()
Get ISO Code of Currency |
int |
getDoc_User_ID()
Get Document Owner (Responsible) |
String |
getDocStatusName()
Get Document Status |
String |
getDocumentInfo()
Get Document Info |
String |
getErrorMessage()
Get Error Message |
static MPayment[] |
getOfBPartner(Properties ctx,
int C_BPartner_ID,
String trxName)
Get Payments Of BPartner |
BigDecimal |
getPayAmt(boolean absolute)
Get Pay Amt |
int |
getPayAmtInCents()
Get Pay Amt in cents |
String |
getProcessMsg()
Get Process Message |
String |
getSummary()
Get Summary |
boolean |
invalidateIt()
Invalidate Document |
boolean |
isCashTrx()
Is Cashbook Transfer Trx |
String |
prepareIt()
Prepare Document |
boolean |
processIt(String processAction)
Process document |
boolean |
processOnline()
Process Payment |
boolean |
reActivateIt()
Re-activate |
boolean |
rejectIt()
Reject Approval |
void |
resetNew()
Reset Payment to new status |
boolean |
reverseAccrualIt()
Reverse Accrual - none |
boolean |
reverseCorrectIt()
Reverse Correction |
boolean |
saveToBP_BankAccount(MBPBankAccount ba)
Save Info from BP Bank Account |
void |
setAccountAddress(String name,
String street,
String city,
String state,
String zip,
String country)
Set Account Address |
void |
setAccountNo(String AccountNo)
Bank Account No |
void |
setAmount(int C_Currency_ID,
BigDecimal payAmt)
Set Payment Amount |
void |
setBankAccountDetails(int C_BankAccount_ID)
Set Bank Account Details. |
boolean |
setBankACH(int C_BankAccount_ID,
boolean isReceipt,
String tenderType,
String routingNo,
String accountNo)
Set ACH BankAccount Info |
boolean |
setBankACH(MPaySelectionCheck preparedPayment)
Set ACH BankAccount Info |
boolean |
setBankCheck(int C_BankAccount_ID,
boolean isReceipt,
String checkNo)
Set Check BankAccount Info |
boolean |
setBankCheck(int C_BankAccount_ID,
boolean isReceipt,
String routingNo,
String accountNo,
String checkNo)
Set Check BankAccount Info |
void |
setBP_BankAccount(MBPBankAccount ba)
Set Info from BP Bank Account |
void |
setC_BankAccount_ID(int C_BankAccount_ID)
Set Bank Account for Payment. |
void |
setC_DocType_ID(boolean isReceipt)
Set Doc Type |
void |
setC_DocType_ID(int C_DocType_ID)
Set Document Type |
void |
setCheckNo(String CheckNo)
Check No |
boolean |
setCreditCard(String TrxType,
String creditCardType,
String creditCardNumber,
String creditCardVV,
int creditCardExpMM,
int creditCardExpYY)
Set Credit Card. |
boolean |
setCreditCard(String TrxType,
String creditCardType,
String creditCardNumber,
String creditCardVV,
String creditCardExp)
Set Credit Card - Exp. |
boolean |
setCreditCardExp(String mmyy)
CreditCard Exp MMYY |
void |
setCreditCardExpMM(int CreditCardExpMM)
Two Digit CreditCard MM |
void |
setCreditCardExpYY(int newCreditCardExpYY)
Two digit CreditCard YY (til 2020) |
void |
setCreditCardNumber(String CreditCardNumber)
Credit Card Number |
void |
setCreditCardVV(String newCreditCardVV)
Verification Code |
void |
setDiscountAmt(BigDecimal DiscountAmt)
Discount Amt |
void |
setErrorMessage(String errorMessage)
Set Error Message |
static void |
setIsAllocated(Properties ctx,
int C_BPartner_ID,
String trxName)
Set Allocated Flag for payments |
void |
setMicr(String MICR)
MICR |
void |
setOverUnderAmt(BigDecimal OverUnderAmt)
OverUnder Amt |
void |
setPayAmt(BigDecimal PayAmt)
Set Payment Amount |
boolean |
setPaymentProcessor()
Set BankAccount and PaymentProcessor |
boolean |
setPaymentProcessor(String tender,
String CCType)
Set BankAccount and PaymentProcessor |
void |
setR_PnRef(String R_PnRef)
Set Refernce No (and Document No) |
void |
setRoutingNo(String RoutingNo)
Routing No |
void |
setTaxAmt(BigDecimal TaxAmt)
Tax Amt |
void |
setWriteOffAmt(BigDecimal WriteOffAmt)
WriteOff Amt |
boolean |
startProcess(Properties ctx,
ProcessInfo pi,
Trx trx)
Process Online Payment. |
boolean |
testAllocation()
Test Allocation (and set allocated flag) |
String |
toString()
String Representation |
boolean |
unlockIt()
Unlock Document. |
boolean |
voidIt()
Void Document. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.process.DocAction |
|---|
get_ID, get_Logger, get_Table_ID, get_TrxName, getAD_Client_ID, getAD_Org_ID, getC_Currency_ID, getCtx, getDocAction, getDocStatus, getDocumentNo, save, setDocStatus |
| Methods inherited from interface org.compiere.model.I_Persistent |
|---|
save |
| Field Detail |
|---|
public static String REVERSE_INDICATOR
| Constructor Detail |
|---|
public MPayment(Properties ctx,
int C_Payment_ID,
String trxName)
ctx - contextC_Payment_ID - payment to load, (0 create new payment)trxName - trx name
public MPayment(Properties ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result set recordtrxName - transaction| Method Detail |
|---|
public static MPayment[] getOfBPartner(Properties ctx,
int C_BPartner_ID,
String trxName)
ctx - contextC_BPartner_ID - idtrxName - transaction
public void resetNew()
public boolean isCashTrx()
public boolean setCreditCard(String TrxType,
String creditCardType,
String creditCardNumber,
String creditCardVV,
int creditCardExpMM,
int creditCardExpYY)
TrxType - Transaction Type see TRX_creditCardType - CC typecreditCardNumber - CC numbercreditCardVV - CC verificationcreditCardExpMM - CC Exp MMcreditCardExpYY - CC Exp YY
public boolean setCreditCard(String TrxType,
String creditCardType,
String creditCardNumber,
String creditCardVV,
String creditCardExp)
TrxType - Transaction Type see TRX_creditCardType - CC typecreditCardNumber - CC numbercreditCardVV - CC verificationcreditCardExp - CC Exp
public boolean setBankACH(MPaySelectionCheck preparedPayment)
C_BankAccount_ID - bank accountisReceipt - true if receipt
public boolean setBankACH(int C_BankAccount_ID,
boolean isReceipt,
String tenderType,
String routingNo,
String accountNo)
C_BankAccount_ID - bank accountisReceipt - true if receipttenderType - - Direct Debit or Direct DepositroutingNo - routingaccountNo - account
public boolean setBankCheck(int C_BankAccount_ID,
boolean isReceipt,
String checkNo)
C_BankAccount_ID - bank accountisReceipt - true if receiptcheckNo - chack no
public boolean setBankCheck(int C_BankAccount_ID,
boolean isReceipt,
String routingNo,
String accountNo,
String checkNo)
C_BankAccount_ID - bank accountisReceipt - true if receiptroutingNo - routing noaccountNo - account nocheckNo - chack no
public void setBankAccountDetails(int C_BankAccount_ID)
C_BankAccount_ID - bank account
public void setAccountAddress(String name,
String street,
String city,
String state,
String zip,
String country)
name - namestreet - streetcity - citystate - statezip - zipcountry - countrypublic boolean processOnline()
public boolean startProcess(Properties ctx,
ProcessInfo pi,
Trx trx)
startProcess in interface ProcessCallctx - Contextpi - Process Infotrx - transaction
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
public BigDecimal getAllocatedAmt()
public boolean testAllocation()
public static void setIsAllocated(Properties ctx,
int C_BPartner_ID,
String trxName)
ctx - contextC_BPartner_ID - if 0 alltrxName - trxpublic void setErrorMessage(String errorMessage)
errorMessage - error messagepublic String getErrorMessage()
public void setC_BankAccount_ID(int C_BankAccount_ID)
setC_BankAccount_ID in interface I_C_PaymentsetC_BankAccount_ID in class X_C_PaymentC_BankAccount_ID - C_BankAccount_IDpublic boolean setPaymentProcessor()
public boolean setPaymentProcessor(String tender,
String CCType)
tender - TenderType see TENDER_CCType - CC Type see CC_
public ValueNamePair[] getCreditCards()
public ValueNamePair[] getCreditCards(BigDecimal amt)
amt - trx amount
public void setCreditCardNumber(String CreditCardNumber)
setCreditCardNumber in interface I_C_PaymentsetCreditCardNumber in class X_C_PaymentCreditCardNumber - CreditCard Numberpublic void setCreditCardVV(String newCreditCardVV)
setCreditCardVV in interface I_C_PaymentsetCreditCardVV in class X_C_PaymentnewCreditCardVV - CC verificationpublic void setCreditCardExpMM(int CreditCardExpMM)
setCreditCardExpMM in interface I_C_PaymentsetCreditCardExpMM in class X_C_PaymentCreditCardExpMM - Exp monthpublic void setCreditCardExpYY(int newCreditCardExpYY)
setCreditCardExpYY in interface I_C_PaymentsetCreditCardExpYY in class X_C_PaymentnewCreditCardExpYY - 2 or 4 digit yearpublic boolean setCreditCardExp(String mmyy)
mmyy - Exp in form of mmyy
public String getCreditCardExp(String delimiter)
delimiter - / - or null
public void setMicr(String MICR)
setMicr in interface I_C_PaymentsetMicr in class X_C_PaymentMICR - MICRpublic void setRoutingNo(String RoutingNo)
setRoutingNo in interface I_C_PaymentsetRoutingNo in class X_C_PaymentRoutingNo - Routing Nopublic void setAccountNo(String AccountNo)
setAccountNo in interface I_C_PaymentsetAccountNo in class X_C_PaymentAccountNo - AccountNopublic void setCheckNo(String CheckNo)
setCheckNo in interface I_C_PaymentsetCheckNo in class X_C_PaymentCheckNo - Check Nopublic void setR_PnRef(String R_PnRef)
setR_PnRef in interface I_C_PaymentsetR_PnRef in class X_C_PaymentR_PnRef - referencepublic void setPayAmt(BigDecimal PayAmt)
setPayAmt in interface I_C_PaymentsetPayAmt in class X_C_PaymentPayAmt - Pay Amt
public void setAmount(int C_Currency_ID,
BigDecimal payAmt)
C_Currency_ID - currencypayAmt - amountpublic void setDiscountAmt(BigDecimal DiscountAmt)
setDiscountAmt in interface I_C_PaymentsetDiscountAmt in class X_C_PaymentDiscountAmt - Discountpublic void setWriteOffAmt(BigDecimal WriteOffAmt)
setWriteOffAmt in interface I_C_PaymentsetWriteOffAmt in class X_C_PaymentWriteOffAmt - WriteOffpublic void setOverUnderAmt(BigDecimal OverUnderAmt)
setOverUnderAmt in interface I_C_PaymentsetOverUnderAmt in class X_C_PaymentOverUnderAmt - OverUnderpublic void setTaxAmt(BigDecimal TaxAmt)
setTaxAmt in interface I_C_PaymentsetTaxAmt in class X_C_PaymentTaxAmt - Taxpublic void setBP_BankAccount(MBPBankAccount ba)
ba - BP bank accountpublic boolean saveToBP_BankAccount(MBPBankAccount ba)
ba - BP bank account
public void setC_DocType_ID(boolean isReceipt)
isReceipt - is receiptpublic void setC_DocType_ID(int C_DocType_ID)
setC_DocType_ID in interface I_C_PaymentsetC_DocType_ID in class X_C_PaymentC_DocType_ID - doc typepublic String getCurrencyISO()
public String getDocStatusName()
public String getCreditCardName()
public String getCreditCardName(String CreditCardType)
CreditCardType - credit card type
public void addDescription(String description)
description - textpublic BigDecimal getPayAmt(boolean absolute)
absolute - if true the absolute amount (i.e. negative if payment)
public int getPayAmtInCents()
public boolean processIt(String processAction)
processIt in interface DocActionprocessAction - document action
public boolean unlockIt()
unlockIt in interface DocActionpublic boolean invalidateIt()
invalidateIt in interface DocActionpublic String prepareIt()
prepareIt in interface DocActionpublic boolean approveIt()
approveIt in interface DocActionpublic boolean rejectIt()
rejectIt in interface DocActionpublic String completeIt()
completeIt in interface DocActionpublic boolean allocateIt()
public boolean voidIt()
voidIt in interface DocActionpublic boolean closeIt()
closeIt in interface DocActionpublic boolean reverseCorrectIt()
reverseCorrectIt in interface DocActionpublic boolean reverseAccrualIt()
reverseAccrualIt in interface DocActionpublic boolean reActivateIt()
reActivateIt in interface DocActionpublic String toString()
toString in class X_C_Paymentpublic String getDocumentInfo()
getDocumentInfo in interface DocActionpublic File createPDF()
createPDF in interface DocActionpublic File createPDF(File file)
file - output file
public String getSummary()
getSummary in interface DocActionpublic String getProcessMsg()
getProcessMsg in interface DocActionpublic int getDoc_User_ID()
getDoc_User_ID in interface DocActionpublic BigDecimal getApprovalAmt()
getApprovalAmt in interface DocAction
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||