Class PaymentForm

java.lang.Object
org.compiere.grid.PaymentForm
All Implemented Interfaces:
IPaymentForm
Direct Known Subclasses:
PaymentFormCash, PaymentFormCheck, PaymentFormCreditCard, PaymentFormDirect, PaymentFormMixedPOS, PaymentFormOnCredit

public abstract class PaymentForm extends Object implements IPaymentForm
Author:
Elaine
  • Field Details

    • log

      protected transient CLogger log
      Logger
    • m_DocStatus

      protected String m_DocStatus
    • m_PaymentRule

      protected String m_PaymentRule
      Start Payment Rule
    • m_DateAcct

      protected Timestamp m_DateAcct
      Start Acct Date
    • m_C_Currency_ID

      protected int m_C_Currency_ID
      Invoice Currency
    • m_AD_Client_ID

      protected int m_AD_Client_ID
    • m_Cash_As_Payment

      protected boolean m_Cash_As_Payment
    • m_AD_Org_ID

      protected int m_AD_Org_ID
    • m_C_BPartner_ID

      protected int m_C_BPartner_ID
    • m_Amount

      protected BigDecimal m_Amount
    • m_needSave

      protected boolean m_needSave
    • m_onlyRule

      protected boolean m_onlyRule
      Only allow changing Rule
    • m_isSOTrx

      protected boolean m_isSOTrx
      Is SOTrx
  • Constructor Details

    • PaymentForm

      public PaymentForm(int WindowNo, GridTab mTab)
      Parameters:
      WindowNo -
      mTab -
  • Method Details

    • dynInit

      public boolean dynInit() throws Exception
      Description copied from interface: IPaymentForm
      dynamic initialization
      Specified by:
      dynInit in interface IPaymentForm
      Returns:
      false if there are errors, true otherwise
      Throws:
      Exception
    • saveChanges

      public boolean saveChanges()
      Description copied from interface: IPaymentForm
      Save Changes
      Specified by:
      saveChanges in interface IPaymentForm
      Returns:
      true, if Window can exit
    • afterSave

      protected abstract void afterSave(boolean success)
      after save and trx committed/rollback
      Parameters:
      success -
    • needSave

      public boolean needSave()
      Description copied from interface: IPaymentForm
      Need to save the calling window (order, invoice)
      Specified by:
      needSave in interface IPaymentForm
      Returns:
      true if changes have been to the calling window
    • getInvoiceID

      protected int getInvoiceID(int C_Order_ID)
      Get Invoice ID for Order
      Parameters:
      C_Order_ID - order
      Returns:
      C_Invoice_ID or 0 if not found
    • processOnline

      public void processOnline()
      Description copied from interface: IPaymentForm
      online payment processing (for e.g credit card)
      Specified by:
      processOnline in interface IPaymentForm
    • isBankAccountProcessorExist

      protected boolean isBankAccountProcessorExist(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName)
      Parameters:
      ctx -
      tender -
      CCType -
      AD_Client_ID -
      C_Currency_ID -
      PayAmt -
      trxName -
      Returns:
      true if online payment processor have been configured for bank account
    • getBankAccountProcessor

      protected MBankAccountProcessor getBankAccountProcessor(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName)
      Get online payment processor configuration
      Parameters:
      ctx -
      tender - tender type
      CCType - credit card type
      AD_Client_ID -
      C_Currency_ID -
      PayAmt -
      trxName -
      Returns:
      MBankAccountProcessor
    • getGridTab

      public GridTab getGridTab()
      Returns:
      GridTab
    • isOnlyRule

      public boolean isOnlyRule()
      Specified by:
      isOnlyRule in interface IPaymentForm
      Returns:
      true if only show payment rule and doesn't save changes to DB
    • isApproved

      public boolean isApproved()
      Specified by:
      isApproved in interface IPaymentForm
      Returns:
      true if payment transaction have been approved by payment gateway
    • getWindowNo

      public int getWindowNo()
      Returns:
      window no
    • setCustomizeValues

      public void setCustomizeValues(PO po)
      Description copied from interface: IPaymentForm
      Make additional changes to PO before write to DB
      Specified by:
      setCustomizeValues in interface IPaymentForm
    • setBankAccountProcessor

      public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor)
      Description copied from interface: IPaymentForm
      Set online payment processor configuration
      Specified by:
      setBankAccountProcessor in interface IPaymentForm