|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.framework.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
| Field Summary | |
|---|---|
static String |
REVERSE_INDICATOR
Reversal Indicator |
| Fields inherited from class org.compiere.framework.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MPayment(Ctx ctx,
int C_Payment_ID,
String trxName)
Default Constructor |
|
MPayment(Ctx 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 |
getCreditCardVV()
Verification Code |
String |
getCurrencyISO()
Get ISO Code of Currency |
BigDecimal |
getDiscountAmt()
Get Discount Amt |
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(Ctx 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 |
static MPayment |
getPayment(Ctx ctx,
String documentNo,
String trxName)
Get Payment using document no |
String |
getProcessMsg()
Get Process Message |
MPayment |
getReversal()
Get Reversal Payment using reversal document no in description |
String |
getSummary()
Get Summary |
BigDecimal |
getWriteOffAmt()
Get WriteOff Amt |
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_Charge_ID(String oldC_Charge_ID,
String newC_Charge_ID,
int windowNo)
Set Charge - Callout |
void |
setC_ConversionType_ID(String oldC_ConversionType_ID,
String newC_ConversionType_ID,
int windowNo)
Set Rate - Callout. |
void |
setC_Currency_ID(String oldC_Currency_ID,
String newC_Currency_ID,
int windowNo)
Set Currency - Callout. |
void |
setC_DocType_ID(boolean isReceipt)
Set Doc Type |
void |
setC_DocType_ID(int C_DocType_ID)
Set Document Type |
void |
setC_DocType_ID(String oldC_DocType_ID,
String newC_DocType_ID,
int windowNo)
Set Order - Callout |
void |
setC_Invoice_ID(String oldC_Invoice_ID,
String newC_Invoice_ID,
int windowNo)
Set Invoice - Callout |
void |
setC_Order_ID(String oldC_Order_ID,
String newC_Order_ID,
int windowNo)
Set Order - Callout |
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 |
setDateTrx(String oldDateTrx,
String newDateTrx,
int windowNo)
Set DateTrx - Callout |
void |
setDiscountAmt(BigDecimal DiscountAmt)
Discount Amt |
void |
setDiscountAmt(String oldDiscountAmt,
String newDiscountAmt,
int windowNo)
Set Discount - Callout |
void |
setErrorMessage(String errorMessage)
Set Error Message |
static void |
setIsAllocated(Ctx ctx,
int C_BPartner_ID,
String trxName)
Set Allocated Flag for payments |
void |
setIsOverUnderPayment(String oldIsOverUnderPayment,
String newIsOverUnderPayment,
int windowNo)
Set Is Over Under Payment - Callout |
void |
setMicr(String MICR)
MICR |
void |
setOverUnderAmt(BigDecimal OverUnderAmt)
OverUnder Amt |
void |
setOverUnderAmt(String oldOverUnderAmt,
String newOverUnderAmt,
int windowNo)
Set Over Under Amt - Callout |
void |
setPayAmt(BigDecimal PayAmt)
Set Payment Amount |
void |
setPayAmt(String oldPayAmt,
String newPayAmt,
int windowNo)
Set Pay Amt - Callout |
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 |
void |
setWriteOffAmt(String oldWriteOffAmt,
String newWriteOffAmt,
int windowNo)
Set WriteOff Amt - Callout |
boolean |
startProcess(Ctx 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, 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 |
| Field Detail |
|---|
public static final String REVERSE_INDICATOR
| Constructor Detail |
|---|
public MPayment(Ctx ctx,
int C_Payment_ID,
String trxName)
ctx - contextC_Payment_ID - payment to load, (0 create new payment)trxName - trx name
public MPayment(Ctx ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result set recordtrxName - transaction| Method Detail |
|---|
public static MPayment[] getOfBPartner(Ctx ctx,
int C_BPartner_ID,
String trxName)
ctx - contextC_BPartner_ID - idtrxName - transaction
public static MPayment getPayment(Ctx ctx,
String documentNo,
String trxName)
ctx - contextdocumentNo - document numbertrxName - 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)
preparedPayment - pay selection check
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(Ctx 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(Ctx 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 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 class X_C_PaymentCreditCardNumber - CreditCard Numberpublic void setCreditCardVV(String newCreditCardVV)
newCreditCardVV - CC verificationpublic String getCreditCardVV()
public void setCreditCardExpMM(int CreditCardExpMM)
setCreditCardExpMM in class X_C_PaymentCreditCardExpMM - Exp monthpublic void setCreditCardExpYY(int newCreditCardExpYY)
setCreditCardExpYY 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 class X_C_PaymentMICR - MICRpublic void setRoutingNo(String RoutingNo)
setRoutingNo in class X_C_PaymentRoutingNo - Routing Nopublic void setAccountNo(String AccountNo)
setAccountNo in class X_C_PaymentAccountNo - AccountNopublic void setCheckNo(String CheckNo)
setCheckNo in class X_C_PaymentCheckNo - Check Nopublic void setR_PnRef(String R_PnRef)
setR_PnRef in class X_C_PaymentR_PnRef - referencepublic void setPayAmt(BigDecimal PayAmt)
setPayAmt 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 class X_C_PaymentDiscountAmt - Discountpublic void setWriteOffAmt(BigDecimal WriteOffAmt)
setWriteOffAmt in class X_C_PaymentWriteOffAmt - WriteOffpublic void setOverUnderAmt(BigDecimal OverUnderAmt)
setOverUnderAmt in class X_C_PaymentOverUnderAmt - OverUnderpublic void setTaxAmt(BigDecimal TaxAmt)
setTaxAmt 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 class X_C_PaymentC_DocType_ID - doc type
@UICallout
public void setC_Invoice_ID(String oldC_Invoice_ID,
String newC_Invoice_ID,
int windowNo)
throws Exception
oldC_Invoice_ID - old BPnewC_Invoice_ID - new BPwindowNo - window no
Exception
@UICallout
public void setC_Order_ID(String oldC_Order_ID,
String newC_Order_ID,
int windowNo)
throws Exception
oldC_Order_ID - old BPnewC_Order_ID - new BPwindowNo - window no
Exception
@UICallout
public void setC_Charge_ID(String oldC_Charge_ID,
String newC_Charge_ID,
int windowNo)
throws Exception
oldC_Charge_ID - old BPnewC_Charge_ID - new BPwindowNo - window no
Exception
@UICallout
public void setC_DocType_ID(String oldC_DocType_ID,
String newC_DocType_ID,
int windowNo)
throws Exception
oldC_DocType_ID - old BPnewC_DocType_ID - new BPwindowNo - window no
Exception
@UICallout
public void setC_ConversionType_ID(String oldC_ConversionType_ID,
String newC_ConversionType_ID,
int windowNo)
throws Exception
oldC_ConversionType_ID - oldnewC_ConversionType_ID - newwindowNo - window no
Exception
@UICallout
public void setC_Currency_ID(String oldC_Currency_ID,
String newC_Currency_ID,
int windowNo)
throws Exception
oldC_Currency_ID - oldnewC_Currency_ID - newwindowNo - window no
Exception
@UICallout
public void setDiscountAmt(String oldDiscountAmt,
String newDiscountAmt,
int windowNo)
throws Exception
oldDiscountAmt - old valuenewDiscountAmt - new valuewindowNo - window
Exception
@UICallout
public void setIsOverUnderPayment(String oldIsOverUnderPayment,
String newIsOverUnderPayment,
int windowNo)
throws Exception
oldIsOverUnderPayment - old valuenewIsOverUnderPayment - new valuewindowNo - window
Exception
@UICallout
public void setOverUnderAmt(String oldOverUnderAmt,
String newOverUnderAmt,
int windowNo)
throws Exception
oldOverUnderAmt - old valuenewOverUnderAmt - new valuewindowNo - window
Exception
@UICallout
public void setPayAmt(String oldPayAmt,
String newPayAmt,
int windowNo)
throws Exception
oldPayAmt - old valuenewPayAmt - new valuewindowNo - window
Exception
@UICallout
public void setWriteOffAmt(String oldWriteOffAmt,
String newWriteOffAmt,
int windowNo)
throws Exception
oldWriteOffAmt - old valuenewWriteOffAmt - new valuewindowNo - window
Exception
@UICallout
public void setDateTrx(String oldDateTrx,
String newDateTrx,
int windowNo)
throws Exception
oldDateTrx - oldnewDateTrx - newwindowNo - window no
Exceptionpublic 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 BigDecimal getDiscountAmt()
getDiscountAmt in class X_C_Paymentpublic BigDecimal getWriteOffAmt()
getWriteOffAmt in class X_C_Paymentpublic int getPayAmtInCents()
public MPayment getReversal()
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
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||