DocType Material Receipt

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

Profile for Material Receipt

The Material Receipt (MM Receipt) is a document of base type Material Receipt (DocBaseType MMR). It can be issued from

 Menu -> Requisition to Invoice -> Material Receipt


Purpose of Material Receipt

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

 This functionality is used to receive products from a vendor.
 It should be used by the warehouse stuff at the point of receival of goods from vendor. 

Accounting consequences

  • How is the Material 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 Material Receipt
Posting Type Accounts and their meaning
Debit TBD -
Credit TDB -

Note: If a document generates accounting consequences the date of the transaction (in this case the Account date) has to fall within an open accounting period.

  • 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 Material Receipt generates if any?
  It creates Material Transactions
  It creates Matching Documents - matches the received quantity with invoiced quantity if the receipt was associated with an invoice.
  • What other documents affect the behaviour of the Material Receipt if any?
  Confirmation affects the behaviour of the Material Receipt. A material receipt cannot be processed unless related confirmations are processed. 
  Also the received quantity is not what is specified as quantity in the receipt's line but the 
  Movement Quantity which gets created by the confirmed quantity specified in the confirmation. 

Debugging the Material Movement document

  • What database tables hold the document's data?
 The main table for the Material Receipt (where they are created and kept) is M_InOut. There are a few auxiliary tables completing its functionality. They are: 
   * M_InOutLine is where the lines of the document are kept 
  Please note that the tables are also used to store the Shipment documents. You may recognize whether something is a Shipment or a Material Receipt by looking at issotrx. If it is a Material receipt the value should be 'N'.

  • What Java classes and methods define the document's behavior?
    • The model class - this class extends the base model X_M_InOut, implements the DocAction interface. The most interesting methods involved in the Material Receipt workflow are:
      • MInOut.prepareIt() - It does a number of checks like whether the accounting period is open whether (ASI) is specified if it is mandatory for a product (is selling products with serial number let say). Finally it sets the total volume and weight by summing up the volume and wight of all products received.
      • MInOut.completeIt() - Processes the document. It does the following things: Checks whether there are unprocessed confirmations for this document. If there are it exits. Checks the document's movement type. If it is Vendor Return it negates the quantity. Next it processes the lines of the document where it associates each line to be received with Attribute Set Instance(ASI) unless one was not explicitly defined. Next it updates the storage for the warehouse and locator specified. It creates a material transaction which can be reviewed from Menu-> Material Management -> Material Transactions. Next it creates a matching record for for and Invoice if the receipt was associated (created from) an Invoice. Finally it marks the document as processed.
      • MInOut.voidIt() - This method voids already created document. If the document was not completed then it simply sets the quantities to zero otherwise it calls reverseCorrectIt().
      • MInOut.reverseCorrectIt() - This method creates a reversal document. This is done by making a copy of the current document and negating the quantity. Here also any matchings with with Purchase order and with Invoice are deleted. Finally it completes the reversal document and closes both the original and reversal documents.
    • The posting class - this class extends the abstract class Doc with concrete implementations of the methods for accounting of documents.
      • - respoinsible for performing the posting of the document. It calls Doc_InOut.postLogic()
      • Doc_InOut.postLogic() - creates the actual account entries.