Difference between revisions of "DocType AR Receipt"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
m
 
m
Line 29: Line 29:
 
----
 
----
 
* ''How and where in the ADempiere's Client App those accounts can be changed (switched to another or complementary meanings)?''
 
* ''How and where in the ADempiere's Client App those accounts can be changed (switched to another or complementary meanings)?''
  The Customer's Invoice doesn't generate automatically any other documents. Later on, on its basis can be generated the Customer's
+
 
   Payment (AR Receipt)
+
    
  
 
=== Place in the Documents Processing Chain ===
 
=== Place in the Documents Processing Chain ===

Revision as of 06:49, 28 December 2007

Profile for Payment from Customer

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

 Menu -> Open Items -> Payment

window.

Purpose of the AR Receipt

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

 The functionality for the AR Receipt is used to issue such document for Sales Order and/or Invoice. 
 Its use is not necessary in the cases when the document has been generated automatically (e.g. by 
 POS Order).

Accounting consequences

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


Accounts affected by AR Receipt
Posting Type Accounts and their meaning
Debit B_INTRANSIT_ACCT (11110 - Checking In-Transfer) -
Credit B_UNALLOCATEDCASH_ACCT (11130 - Checking Unallocated Receipts) -



  • 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) - this method is the connection to the class DocumentEngine.java - it creates an instance of the class and by passing it the document's current state (one of the constants defined in the DocAction interface, which value for the document is kept in the database) it gets the appropriate action to be done
      • MPayment.prepareIt() - does some preliminary actions: checks whether the accounting period is open; explodes BOM (assures that none of the Invoice's products has missing subparts, if any); calculates the total tax of the invoice; creates payment schedule based on the payment term; checks the credit status of the Business Partner; sets the DocAction to complete.
      • MInvoice.completeIt() - call MInvoice.prepareIt; approves the document if it is not approved; creates cash-lines if the payment term is cash; updates the credit amount of the Business Partner.
    • The posting class Doc_Invoice.java - this class extends the abstract class Doc with concrete implementations of the methods for accounting of documents.
      • Doc_Invoice.post() - respoinsible for performing the posting of the focument. It calls Doc_Invoice.postLogic()
      • Doc_Invoice.postLogic() - creates the actual account entries like this: checks whether the account is balanced, the account period is open and the amount is convertible; calls Doc_Invoice.createFacts() - For each line DocLine.getAccount() is called which selects the account of each product from M_Product_Acct based on the product id and the accounting schema.