Difference between revisions of "DocType Material Movement"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(Accounting consequences)
m (wikify)
Line 53: Line 53:
 
*** Doc_Movement.'''post()''' - respoinsible for performing the posting of the document. It calls Doc_Movement.'''postLogic()'''
 
*** Doc_Movement.'''post()''' - respoinsible for performing the posting of the document. It calls Doc_Movement.'''postLogic()'''
 
*** Doc_Movement.'''postLogic()''' - creates the actual account entries.
 
*** Doc_Movement.'''postLogic()''' - creates the actual account entries.
 +
 +
[[Category:Developer documentation]]

Revision as of 15:42, 28 September 2008

Profile for Material Movement

The Material Movement (AP Invoice) is a document of base type Material Movement (DocBaseType MMM). It can be issued from

 Menu -> Material Management -> Inventory Move

window.

Purpose of the Material Movement

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 move inventory from one warehouse to another and from one locater of to another.
 It should be used in cases where you would like to relocate quantity of some stock.

Accounting consequences

  • How is the Material Movement 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 Movement
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 movement 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 AR Receipt generates if any?
  This document creates Material Transactions which are not exactly documents.

Debugging the Material Movement document

  • What database tables hold the document's data?
 The main table for the Material Movement (where they are created and kept) is M_Movement. There are a few auxiliary tables completing its functionality. They are: 
   * M_MovementLine is where the lines of the document are kept 
   * M_MovementLineMA is a temporary storage for the products to be moved by lots (ASI).

  • What Java classes and methods define the document's behavior?
    • The model class MMovement.java - this class extends the base model X_M_Movement, implements the DocAction interface. The most interesting methods involved in the Material Movement workflow (TBD) are:
      • MMovement.prepareIt() - This method is mainly responsible for deciding products from which particular lot (ASI) should be moved. It first checks for each line in the Material Movement document whether lot(ASI) has been specified . If (ASI) has not been specified it takes the material policy of the product then it gets all products stored in the location specified as (locatoin from) on the Material Movement docuemnt and prepares them (inserts them in M_MovementLineMA) for movement. If the quantity of found products with (ASI) defined is not enough it inserts a line in M_MovementLineMA with (ASI) of zero.
      • MMovement.completeIt() - This method is responsible for making the actual movement. The first thing the method does is it checks whether there are any outstanding confirmations for this product i.e. whether any of the products are not still in Transit. If there are it exits. The next thing that happens is the actual movement. For each line in the document it checks whether (ASI) was specified. If (ASI) was not specified it moves the products as specified in M_MovementLineMA. The movement consists of adjusting the quantity on hand for both locations specified in the Movement docuemnt and creating Material transactions which can later be reviewed from Main Menu-> Material Management -> Material Transactions.
      • MMovement.voidIt() - This method voids already created document. If the document was not completed then it simply sets the quantities to zero. If the docuement was completed it calls the method reverseCorrectIt(). Finally it marks the document as processed.
      • MMovement.reverseCorrectIt() - This method creates a reversal document. This is done by making a copy of the current document and negating the quantity. Finally it completes the reversal document and closes both the original and reversal documents.
    • The posting class Doc_Movement.java - this class extends the abstract class Doc with concrete implementations of the methods for accounting of documents.
      • Doc_Movement.post() - respoinsible for performing the posting of the document. It calls Doc_Movement.postLogic()
      • Doc_Movement.postLogic() - creates the actual account entries.