Compiere 3.1

org.compiere.model
Class MPayment

java.lang.Object
  extended by org.compiere.framework.PO
      extended by org.compiere.model.X_C_Payment
          extended by org.compiere.model.MPayment
All Implemented Interfaces:
Serializable, Cloneable, Comparator<PO>, DocAction, ProcessCall, Evaluatee

public final class MPayment
extends X_C_Payment
implements DocAction, ProcessCall

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
  

Version:
$Id: MPayment.java,v 1.4 2006/10/02 05:18:39 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
static String REVERSE_INDICATOR
          Reversal Indicator
 
Fields inherited from class org.compiere.model.X_C_Payment
accessLevel, AD_ORGTRX_ID_AD_Reference_ID, CREDITCARDTYPE_AD_Reference_ID, CREDITCARDTYPE_Amex, CREDITCARDTYPE_ATM, CREDITCARDTYPE_Diners, CREDITCARDTYPE_Discover, CREDITCARDTYPE_MasterCard, CREDITCARDTYPE_PurchaseCard, CREDITCARDTYPE_Visa, DOCACTION_AD_Reference_ID, DOCACTION_Approve, DOCACTION_Close, DOCACTION_Complete, DOCACTION_Invalidate, DOCACTION_None, DOCACTION_Post, DOCACTION_Prepare, DOCACTION_Re_Activate, DOCACTION_Reject, DOCACTION_Reverse_Accrual, DOCACTION_Reverse_Correct, DOCACTION_Unlock, DOCACTION_Void, DOCACTION_WaitComplete, DOCSTATUS_AD_Reference_ID, DOCSTATUS_Approved, DOCSTATUS_Closed, DOCSTATUS_Completed, DOCSTATUS_Drafted, DOCSTATUS_InProgress, DOCSTATUS_Invalid, DOCSTATUS_NotApproved, DOCSTATUS_Reversed, DOCSTATUS_Unknown, DOCSTATUS_Voided, DOCSTATUS_WaitingConfirmation, DOCSTATUS_WaitingPayment, Model, R_AVSADDR_AD_Reference_ID, R_AVSADDR_Match, R_AVSADDR_NoMatch, R_AVSADDR_Unavailable, R_AVSZIP_AD_Reference_ID, R_AVSZIP_Match, R_AVSZIP_NoMatch, R_AVSZIP_Unavailable, REF_PAYMENT_ID_AD_Reference_ID, Table_ID, Table_Name, TENDERTYPE_AD_Reference_ID, TENDERTYPE_Check, TENDERTYPE_CreditCard, TENDERTYPE_DirectDebit, TENDERTYPE_DirectDeposit, TRXTYPE_AD_Reference_ID, TRXTYPE_Authorization, TRXTYPE_CreditPayment, TRXTYPE_DelayedCapture, TRXTYPE_Sales, TRXTYPE_VoiceAuthorization, TRXTYPE_Void, updatedMS, USER1_ID_AD_Reference_ID, USER2_ID_AD_Reference_ID
 
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
 
Fields inherited from interface org.compiere.process.DocAction
ACTION_Approve, ACTION_Close, ACTION_Complete, ACTION_Invalidate, ACTION_None, ACTION_Post, ACTION_Prepare, ACTION_ReActivate, ACTION_Reject, ACTION_ReOpen, ACTION_Reverse_Accrual, ACTION_Reverse_Correct, ACTION_Unlock, ACTION_Void, ACTION_WaitComplete, STATUS_Approved, STATUS_Closed, STATUS_Completed, STATUS_Drafted, STATUS_InProgress, STATUS_Invalid, STATUS_NotApproved, STATUS_Reversed, STATUS_Unknown, STATUS_Voided, STATUS_WaitingConfirmation, STATUS_WaitingPayment
 
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 org.compiere.model.X_C_Payment
get_AccessLevel, getA_City, getA_Country, getA_EMail, getA_Ident_DL, getA_Ident_SSN, getA_Name, getA_State, getA_Street, getA_Zip, getAccountNo, getAD_OrgTrx_ID, getC_Activity_ID, getC_BankAccount_ID, getC_BP_BankAccount_ID, getC_BPartner_ID, getC_Campaign_ID, getC_Charge_ID, getC_ConversionType_ID, getC_Currency_ID, getC_DocType_ID, getC_Invoice_ID, getC_Order_ID, getC_Payment_ID, getC_PaymentBatch_ID, getC_Project_ID, getChargeAmt, getCheckNo, getCreditCardExpMM, getCreditCardExpYY, getCreditCardNumber, getCreditCardType, getDateAcct, getDateTrx, getDescription, getDocAction, getDocStatus, getDocumentNo, getKeyNamePair, getMicr, getOProcessing, getOrig_TrxID, getOverUnderAmt, getPayAmt, getPONum, getR_AuthCode_DC, getR_AuthCode, getR_AvsAddr, getR_AvsZip, getR_Info, getR_PnRef_DC, getR_PnRef, getR_RespMsg, getR_Result, getRef_Payment_ID, getRoutingNo, getSwipe, getTaxAmt, getTenderType, getTrxType, getUser1_ID, getUser2_ID, getVoiceAuthCode, initPO, isAllocated, isApproved, isCreditCardTypeValid, isDelayedCapture, isDocActionValid, isDocStatusValid, isOnline, isOverUnderPayment, isPosted, isPrepayment, isProcessed, isProcessing, isR_AvsAddrValid, isR_AvsZipValid, isR_CVV2Match, isReceipt, isReconciled, isSelfService, isTenderTypeValid, isTrxTypeValid, setA_City, setA_Country, setA_EMail, setA_Ident_DL, setA_Ident_SSN, setA_Name, setA_State, setA_Street, setA_Zip, setAD_OrgTrx_ID, setC_Activity_ID, setC_BP_BankAccount_ID, setC_BPartner_ID, setC_Campaign_ID, setC_Charge_ID, setC_ConversionType_ID, setC_Currency_ID, setC_Invoice_ID, setC_Order_ID, setC_Payment_ID, setC_PaymentBatch_ID, setC_Project_ID, setChargeAmt, setCreditCardType, setDateAcct, setDateTrx, setDescription, setDocAction, setDocStatus, setDocumentNo, setIsAllocated, setIsApproved, setIsDelayedCapture, setIsOnline, setIsOverUnderPayment, setIsPrepayment, setIsReceipt, setIsReconciled, setIsSelfService, setOProcessing, setOrig_TrxID, setPONum, setPosted, setProcessed, setProcessing, setR_AuthCode_DC, setR_AuthCode, setR_AvsAddr, setR_AvsZip, setR_CVV2Match, setR_Info, setR_PnRef_DC, setR_RespMsg, setR_Result, setRef_Payment_ID, setSwipe, setTenderType, setTrxType, setUser1_ID, setUser2_ID, setVoiceAuthCode
 
Methods inherited from class org.compiere.framework.PO
addAttachment, addAttachment, addError, afterDelete, afterSave, beforeDelete, compare, convertToBigDecimal, convertToBoolean, convertToInt, convertToTimestamp, copy, copyValues, copyValues, createAttachment, delete_Accounting, delete, delete, dump, dump, equals, get_ChangeVO, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_EntityType, get_HashMap, get_ID, get_IDOld, get_Info, get_KeyColumns, get_Logger, get_Table_ID, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_ValuesAsString, get_WhereClause, get_xmlDocument, get_xmlString, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getVO, hashCode, insert_Accounting, is_Changed, is_KeyColumn, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveNew_getID, saveNewInsertSQL, saveNewSpecial, saveUpdate, set_ChangeVO, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueString, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setContext, setCtx, setDocWorkflowMgr, setIsActive, setStandardDefaults, setUpdateable, setUpdatedBy, toStringX, unlock, update
 
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

REVERSE_INDICATOR

public static final String REVERSE_INDICATOR
Reversal Indicator

See Also:
Constant Field Values
Constructor Detail

MPayment

public MPayment(Ctx ctx,
                int C_Payment_ID,
                String trxName)
Default Constructor

Parameters:
ctx - context
C_Payment_ID - payment to load, (0 create new payment)
trxName - trx name

MPayment

public MPayment(Ctx ctx,
                ResultSet rs,
                String trxName)
Load Constructor

Parameters:
ctx - context
rs - result set record
trxName - transaction
Method Detail

getOfBPartner

public static MPayment[] getOfBPartner(Ctx ctx,
                                       int C_BPartner_ID,
                                       String trxName)
Get Payments Of BPartner

Parameters:
ctx - context
C_BPartner_ID - id
trxName - transaction
Returns:
array

getPayment

public static MPayment getPayment(Ctx ctx,
                                  String documentNo,
                                  String trxName)
Get Payment using document no

Parameters:
ctx - context
documentNo - document number
trxName - transaction
Returns:
payment

resetNew

public void resetNew()
Reset Payment to new status


isCashTrx

public boolean isCashTrx()
Is Cashbook Transfer Trx

Returns:
true if Cash Trx

setCreditCard

public boolean setCreditCard(String TrxType,
                             String creditCardType,
                             String creditCardNumber,
                             String creditCardVV,
                             int creditCardExpMM,
                             int creditCardExpYY)
Set Credit Card. Need to set PatmentProcessor after Amount/Currency Set

Parameters:
TrxType - Transaction Type see TRX_
creditCardType - CC type
creditCardNumber - CC number
creditCardVV - CC verification
creditCardExpMM - CC Exp MM
creditCardExpYY - CC Exp YY
Returns:
true if valid

setCreditCard

public boolean setCreditCard(String TrxType,
                             String creditCardType,
                             String creditCardNumber,
                             String creditCardVV,
                             String creditCardExp)
Set Credit Card - Exp. Need to set PatmentProcessor after Amount/Currency Set

Parameters:
TrxType - Transaction Type see TRX_
creditCardType - CC type
creditCardNumber - CC number
creditCardVV - CC verification
creditCardExp - CC Exp
Returns:
true if valid

setBankACH

public boolean setBankACH(MPaySelectionCheck preparedPayment)
Set ACH BankAccount Info

Parameters:
preparedPayment - pay selection check
Returns:
true if valid

setBankACH

public boolean setBankACH(int C_BankAccount_ID,
                          boolean isReceipt,
                          String tenderType,
                          String routingNo,
                          String accountNo)
Set ACH BankAccount Info

Parameters:
C_BankAccount_ID - bank account
isReceipt - true if receipt
tenderType - - Direct Debit or Direct Deposit
routingNo - routing
accountNo - account
Returns:
true if valid

setBankCheck

public boolean setBankCheck(int C_BankAccount_ID,
                            boolean isReceipt,
                            String checkNo)
Set Check BankAccount Info

Parameters:
C_BankAccount_ID - bank account
isReceipt - true if receipt
checkNo - chack no
Returns:
true if valid

setBankCheck

public boolean setBankCheck(int C_BankAccount_ID,
                            boolean isReceipt,
                            String routingNo,
                            String accountNo,
                            String checkNo)
Set Check BankAccount Info

Parameters:
C_BankAccount_ID - bank account
isReceipt - true if receipt
routingNo - routing no
accountNo - account no
checkNo - chack no
Returns:
true if valid

setBankAccountDetails

public void setBankAccountDetails(int C_BankAccount_ID)
Set Bank Account Details. Look up Routing No & Bank Acct No

Parameters:
C_BankAccount_ID - bank account

setAccountAddress

public void setAccountAddress(String name,
                              String street,
                              String city,
                              String state,
                              String zip,
                              String country)
Set Account Address

Parameters:
name - name
street - street
city - city
state - state
zip - zip
country - country

processOnline

public boolean processOnline()
Process Payment

Returns:
true if approved

startProcess

public boolean startProcess(Ctx ctx,
                            ProcessInfo pi,
                            Trx trx)
Process Online Payment. implements ProcessCall after standard constructor Called when pressing the Process_Online button in C_Payment

Specified by:
startProcess in interface ProcessCall
Parameters:
ctx - Context
pi - Process Info
trx - transaction
Returns:
true if the next process should be performed

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
save

getAllocatedAmt

public BigDecimal getAllocatedAmt()
Get Allocated Amt in Payment Currency

Returns:
amount or null

testAllocation

public boolean testAllocation()
Test Allocation (and set allocated flag)

Returns:
true if updated

setIsAllocated

public static void setIsAllocated(Ctx ctx,
                                  int C_BPartner_ID,
                                  String trxName)
Set Allocated Flag for payments

Parameters:
ctx - context
C_BPartner_ID - if 0 all
trxName - trx

setErrorMessage

public void setErrorMessage(String errorMessage)
Set Error Message

Parameters:
errorMessage - error message

getErrorMessage

public String getErrorMessage()
Get Error Message

Returns:
error message

setC_BankAccount_ID

public void setC_BankAccount_ID(int C_BankAccount_ID)
Set Bank Account for Payment.

Overrides:
setC_BankAccount_ID in class X_C_Payment
Parameters:
C_BankAccount_ID - C_BankAccount_ID

setPaymentProcessor

public boolean setPaymentProcessor()
Set BankAccount and PaymentProcessor

Returns:
true if found

setPaymentProcessor

public boolean setPaymentProcessor(String tender,
                                   String CCType)
Set BankAccount and PaymentProcessor

Parameters:
tender - TenderType see TENDER_
CCType - CC Type see CC_
Returns:
true if found

getCreditCards

public ValueNamePair[] getCreditCards()
Get Accepted Credit Cards for PayAmt (default 0)

Returns:
credit cards

getCreditCards

public ValueNamePair[] getCreditCards(BigDecimal amt)
Get Accepted Credit Cards for amount

Parameters:
amt - trx amount
Returns:
credit cards

setCreditCardNumber

public void setCreditCardNumber(String CreditCardNumber)
Credit Card Number

Overrides:
setCreditCardNumber in class X_C_Payment
Parameters:
CreditCardNumber - CreditCard Number

setCreditCardVV

public void setCreditCardVV(String newCreditCardVV)
Verification Code

Parameters:
newCreditCardVV - CC verification

getCreditCardVV

public String getCreditCardVV()
Verification Code

Returns:
CC verification

setCreditCardExpMM

public void setCreditCardExpMM(int CreditCardExpMM)
Two Digit CreditCard MM

Overrides:
setCreditCardExpMM in class X_C_Payment
Parameters:
CreditCardExpMM - Exp month

setCreditCardExpYY

public void setCreditCardExpYY(int newCreditCardExpYY)
Two digit CreditCard YY (til 2020)

Overrides:
setCreditCardExpYY in class X_C_Payment
Parameters:
newCreditCardExpYY - 2 or 4 digit year

setCreditCardExp

public boolean setCreditCardExp(String mmyy)
CreditCard Exp MMYY

Parameters:
mmyy - Exp in form of mmyy
Returns:
true if valid

getCreditCardExp

public String getCreditCardExp(String delimiter)
CreditCard Exp MMYY

Parameters:
delimiter - / - or null
Returns:
Exp

setMicr

public void setMicr(String MICR)
MICR

Overrides:
setMicr in class X_C_Payment
Parameters:
MICR - MICR

setRoutingNo

public void setRoutingNo(String RoutingNo)
Routing No

Overrides:
setRoutingNo in class X_C_Payment
Parameters:
RoutingNo - Routing No

setAccountNo

public void setAccountNo(String AccountNo)
Bank Account No

Overrides:
setAccountNo in class X_C_Payment
Parameters:
AccountNo - AccountNo

setCheckNo

public void setCheckNo(String CheckNo)
Check No

Overrides:
setCheckNo in class X_C_Payment
Parameters:
CheckNo - Check No

setR_PnRef

public void setR_PnRef(String R_PnRef)
Set Refernce No (and Document No)

Overrides:
setR_PnRef in class X_C_Payment
Parameters:
R_PnRef - reference

setPayAmt

public void setPayAmt(BigDecimal PayAmt)
Set Payment Amount

Overrides:
setPayAmt in class X_C_Payment
Parameters:
PayAmt - Pay Amt

setAmount

public void setAmount(int C_Currency_ID,
                      BigDecimal payAmt)
Set Payment Amount

Parameters:
C_Currency_ID - currency
payAmt - amount

setDiscountAmt

public void setDiscountAmt(BigDecimal DiscountAmt)
Discount Amt

Overrides:
setDiscountAmt in class X_C_Payment
Parameters:
DiscountAmt - Discount

setWriteOffAmt

public void setWriteOffAmt(BigDecimal WriteOffAmt)
WriteOff Amt

Overrides:
setWriteOffAmt in class X_C_Payment
Parameters:
WriteOffAmt - WriteOff

setOverUnderAmt

public void setOverUnderAmt(BigDecimal OverUnderAmt)
OverUnder Amt

Overrides:
setOverUnderAmt in class X_C_Payment
Parameters:
OverUnderAmt - OverUnder

setTaxAmt

public void setTaxAmt(BigDecimal TaxAmt)
Tax Amt

Overrides:
setTaxAmt in class X_C_Payment
Parameters:
TaxAmt - Tax

setBP_BankAccount

public void setBP_BankAccount(MBPBankAccount ba)
Set Info from BP Bank Account

Parameters:
ba - BP bank account

saveToBP_BankAccount

public boolean saveToBP_BankAccount(MBPBankAccount ba)
Save Info from BP Bank Account

Parameters:
ba - BP bank account
Returns:
true if saved

setC_DocType_ID

public void setC_DocType_ID(boolean isReceipt)
Set Doc Type

Parameters:
isReceipt - is receipt

setC_DocType_ID

public void setC_DocType_ID(int C_DocType_ID)
Set Document Type

Overrides:
setC_DocType_ID in class X_C_Payment
Parameters:
C_DocType_ID - doc type

setC_Invoice_ID

@UICallout
public void setC_Invoice_ID(String oldC_Invoice_ID,
                                      String newC_Invoice_ID,
                                      int windowNo)
                     throws Exception
Set Invoice - Callout

Parameters:
oldC_Invoice_ID - old BP
newC_Invoice_ID - new BP
windowNo - window no
Throws:
Exception

setC_Order_ID

@UICallout
public void setC_Order_ID(String oldC_Order_ID,
                                    String newC_Order_ID,
                                    int windowNo)
                   throws Exception
Set Order - Callout

Parameters:
oldC_Order_ID - old BP
newC_Order_ID - new BP
windowNo - window no
Throws:
Exception

setC_Charge_ID

@UICallout
public void setC_Charge_ID(String oldC_Charge_ID,
                                     String newC_Charge_ID,
                                     int windowNo)
                    throws Exception
Set Charge - Callout

Parameters:
oldC_Charge_ID - old BP
newC_Charge_ID - new BP
windowNo - window no
Throws:
Exception

setC_DocType_ID

@UICallout
public void setC_DocType_ID(String oldC_DocType_ID,
                                      String newC_DocType_ID,
                                      int windowNo)
                     throws Exception
Set Order - Callout

Parameters:
oldC_DocType_ID - old BP
newC_DocType_ID - new BP
windowNo - window no
Throws:
Exception

setC_ConversionType_ID

@UICallout
public void setC_ConversionType_ID(String oldC_ConversionType_ID,
                                             String newC_ConversionType_ID,
                                             int windowNo)
                            throws Exception
Set Rate - Callout.

Parameters:
oldC_ConversionType_ID - old
newC_ConversionType_ID - new
windowNo - window no
Throws:
Exception

setC_Currency_ID

@UICallout
public void setC_Currency_ID(String oldC_Currency_ID,
                                       String newC_Currency_ID,
                                       int windowNo)
                      throws Exception
Set Currency - Callout.

Parameters:
oldC_Currency_ID - old
newC_Currency_ID - new
windowNo - window no
Throws:
Exception

setDiscountAmt

@UICallout
public void setDiscountAmt(String oldDiscountAmt,
                                     String newDiscountAmt,
                                     int windowNo)
                    throws Exception
Set Discount - Callout

Parameters:
oldDiscountAmt - old value
newDiscountAmt - new value
windowNo - window
Throws:
Exception

setIsOverUnderPayment

@UICallout
public void setIsOverUnderPayment(String oldIsOverUnderPayment,
                                            String newIsOverUnderPayment,
                                            int windowNo)
                           throws Exception
Set Is Over Under Payment - Callout

Parameters:
oldIsOverUnderPayment - old value
newIsOverUnderPayment - new value
windowNo - window
Throws:
Exception

setOverUnderAmt

@UICallout
public void setOverUnderAmt(String oldOverUnderAmt,
                                      String newOverUnderAmt,
                                      int windowNo)
                     throws Exception
Set Over Under Amt - Callout

Parameters:
oldOverUnderAmt - old value
newOverUnderAmt - new value
windowNo - window
Throws:
Exception

setPayAmt

@UICallout
public void setPayAmt(String oldPayAmt,
                                String newPayAmt,
                                int windowNo)
               throws Exception
Set Pay Amt - Callout

Parameters:
oldPayAmt - old value
newPayAmt - new value
windowNo - window
Throws:
Exception

setWriteOffAmt

@UICallout
public void setWriteOffAmt(String oldWriteOffAmt,
                                     String newWriteOffAmt,
                                     int windowNo)
                    throws Exception
Set WriteOff Amt - Callout

Parameters:
oldWriteOffAmt - old value
newWriteOffAmt - new value
windowNo - window
Throws:
Exception

setDateTrx

@UICallout
public void setDateTrx(String oldDateTrx,
                                 String newDateTrx,
                                 int windowNo)
                throws Exception
Set DateTrx - Callout

Parameters:
oldDateTrx - old
newDateTrx - new
windowNo - window no
Throws:
Exception

getCurrencyISO

public String getCurrencyISO()
Get ISO Code of Currency

Returns:
Currency ISO

getDocStatusName

public String getDocStatusName()
Get Document Status

Returns:
Document Status Clear Text

getCreditCardName

public String getCreditCardName()
Get Name of Credit Card

Returns:
Name

getCreditCardName

public String getCreditCardName(String CreditCardType)
Get Name of Credit Card

Parameters:
CreditCardType - credit card type
Returns:
Name

addDescription

public void addDescription(String description)
Add to Description

Parameters:
description - text

getPayAmt

public BigDecimal getPayAmt(boolean absolute)
Get Pay Amt

Parameters:
absolute - if true the absolute amount (i.e. negative if payment)
Returns:
amount

getDiscountAmt

public BigDecimal getDiscountAmt()
Get Discount Amt

Overrides:
getDiscountAmt in class X_C_Payment
Returns:
amount

getWriteOffAmt

public BigDecimal getWriteOffAmt()
Get WriteOff Amt

Overrides:
getWriteOffAmt in class X_C_Payment
Returns:
amount

getPayAmtInCents

public int getPayAmtInCents()
Get Pay Amt in cents

Returns:
amount in cents

getReversal

public MPayment getReversal()
Get Reversal Payment using reversal document no in description

Returns:
payment

processIt

public boolean processIt(String processAction)
Process document

Specified by:
processIt in interface DocAction
Parameters:
processAction - document action
Returns:
true if performed

unlockIt

public boolean unlockIt()
Unlock Document.

Specified by:
unlockIt in interface DocAction
Returns:
true if success

invalidateIt

public boolean invalidateIt()
Invalidate Document

Specified by:
invalidateIt in interface DocAction
Returns:
true if success

prepareIt

public String prepareIt()
Prepare Document

Specified by:
prepareIt in interface DocAction
Returns:
new status (In Progress or Invalid)

approveIt

public boolean approveIt()
Approve Document

Specified by:
approveIt in interface DocAction
Returns:
true if success

rejectIt

public boolean rejectIt()
Reject Approval

Specified by:
rejectIt in interface DocAction
Returns:
true if success

completeIt

public String completeIt()
Complete Document

Specified by:
completeIt in interface DocAction
Returns:
new status (Complete, In Progress, Invalid, Waiting ..)

allocateIt

public boolean allocateIt()
Allocate It. Only call when there is NO allocation as it will create duplicates. If an invoice exists, it allocates that otherwise it allocates Payment Selection.

Returns:
true if allocated

voidIt

public boolean voidIt()
Void Document.

Specified by:
voidIt in interface DocAction
Returns:
true if success

closeIt

public boolean closeIt()
Close Document.

Specified by:
closeIt in interface DocAction
Returns:
true if success

reverseCorrectIt

public boolean reverseCorrectIt()
Reverse Correction

Specified by:
reverseCorrectIt in interface DocAction
Returns:
true if success

reverseAccrualIt

public boolean reverseAccrualIt()
Reverse Accrual - none

Specified by:
reverseAccrualIt in interface DocAction
Returns:
true if success

reActivateIt

public boolean reActivateIt()
Re-activate

Specified by:
reActivateIt in interface DocAction
Returns:
true if success

toString

public String toString()
String Representation

Overrides:
toString in class X_C_Payment
Returns:
info

getDocumentInfo

public String getDocumentInfo()
Get Document Info

Specified by:
getDocumentInfo in interface DocAction
Returns:
document info (untranslated)

createPDF

public File createPDF()
Create PDF

Specified by:
createPDF in interface DocAction
Returns:
File or null

createPDF

public File createPDF(File file)
Create PDF file

Parameters:
file - output file
Returns:
file if success

getSummary

public String getSummary()
Get Summary

Specified by:
getSummary in interface DocAction
Returns:
Summary of Document

getProcessMsg

public String getProcessMsg()
Get Process Message

Specified by:
getProcessMsg in interface DocAction
Returns:
clear text error message

getDoc_User_ID

public int getDoc_User_ID()
Get Document Owner (Responsible)

Specified by:
getDoc_User_ID in interface DocAction
Returns:
AD_User_ID

getApprovalAmt

public BigDecimal getApprovalAmt()
Get Document Approval Amount

Specified by:
getApprovalAmt in interface DocAction
Returns:
amount payment(AP) or write-off(AR)

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.