DocType AP Payment

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Profile for Payment to Vendor

The Payment from Customer (AP Payment) is a document of base type AP Payment. It can be issued from the functionality found at

 Menu -> Open Items -> Payment

window.

Purpose of the AP Payment

When in the whole business process it should be used and in what cases its use is specifically not appropriate?

 The functionality for the AP Payment is used to issue such document for Invoice given to us by the 
 Vendor.

Accounting consequences

  • How is the AP Payment involved in the accounting processes, e.g. what accounts are debited and what accounts are credited through its use (if any)?


Accounts affected by AP Payment
Movement Type Accounts and their meaning
Debit B_PAYMENTSELECT_ACCT (21300 - Payment Selection) -
Credit B_INTRANSIT_ACCT (11110 - Checking In-Transfer) -



  • How and where in the ADempiere's Client App those accounts can be changed (switched to another or complementary meanings)?


Place in the Documents Processing Chain

  • What other documents the AR Receipt generates if any?

Receipts do not generate other documents

Debugging the AR Receipt

  • What database tables hold the document's data?
 The main table for the Payments (where they are created and kept) is C_Payment. For the Payment 
 there are two auxiliary tables completing its functionality. They are: 
   * C_PaymentAllocate is where the connection between the Paymant and a corresponding Invoice 
     is described
   * C_AllocationLine is where the lines of the above allocation are kept

  • What Java classes and methods define the document's behavior?
    • The model class MPayment.java - this class extends the base model X_C_Payment, implements the DocAction and ProcessCall interfaces. It exploits one or more Payment Processors when there are any defined and used in the . The most interesting methods involved in the Invoice's Workflow (Process_Payment) are:
      • MPayment.processIt(String) -
      • MPayment.prepareIt() -
      • MPayment.completeIt() -
    • The posting class Doc_Payment.java - this class extends the abstract class Doc with concrete implementations of the methods for accounting of documents.
      • Doc_Payment.post() - responsible for performing the posting of the document. It calls Doc_Payment.postLogic()
      • Doc_Payment.postLogic() - creates the actual account entries like this: