Calculate Material Plan

Automated Testing Tools are used to assure modifications are always backward compatible and safe for production
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are moved to the same sub-forum. Language will be corrected for readability.

Calculate Material Plan

Postby red1 » Thu Mar 17, 2011 11:28 am

Based on the logic flow here, the following is a detailed debugging flow.

ACTION 1: Create a Sales Order of a PatioSet which has zero inventory. View in MRP Info.
RESULT 1: Triggers a demand for one PatioSet (PP_MRP) and 40 chairs as BOM child safety stock (PP_Product_Planning).
1a. A PatioSet
1b. 40 Patio Chairs

ACTION 2: Run Calculate Material Plan (Java class: MRP.java)
RESULT 2: Generates Manufacturing Order (PP_Order) for BOM children (PP_OrderLine):
2a: 1 Table
2b: 4 chairs
2c: 1 SunScreen

During the Sales Order completion it fires a ModelValidator call to LiberoValidator:
Code: Select all
         else if (type == TYPE_AFTER_CHANGE && order.isSOTrx())
         {
            if (isReleased || MPPMRP.isChanged(order))
            {   
               MPPMRP.C_Order(order);
            }
         }
      }

Under the hood: This will call MPPRMP class and create a PP_MRP record from the C_Order.

Calculate Material Plan (MRP.java) under the hood:PP_MRP receives 3 demand records which are the BOM Children and 1 supply record of PatioSet. This time a record each is created for PP_Order, PP_Order_BOM, PP_Order_BomLine, and 4 AD_Notes (about each BOM Children and the Parent Product)
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Calculate Material Plan

Postby red1 » Sat Mar 19, 2011 2:57 am

Below is the Fitnesse Test Output that proves a framework for reuse in testing the whole Libero Mfg engine. It is able to carry out a transaction (Sales Order of a zero inventory), trigger the ModelValidator by Libero, execute a process (Calculate Material Plan), list out tables values (PP_MRP and PP_Order).

Image
Image
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Calculate Material Plan

Postby red1 » Sun Mar 20, 2011 7:11 pm

The above is committed in SVN:

Revision: 15111 http://adempiere.svn.sourceforge.net/ad ... 1&view=rev
NOTE: MRP.java overload in local fitnesse package to avoid commitEx() so that tests are repeatable. Remember to synch if MRP changed in core.


The above tested ok, in a separate binary of Libero Cost Engine. Same database from Cost Engine.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Calculate Material Plan

Postby red1 » Tue Aug 02, 2011 2:28 pm

To see the rest of Manufacturing Make to Order testing you can refer to another thread here.

For the Accounting Consequence of that you can refer here.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to Quality Assurance

Who is online

Users browsing this forum: No registered users and 1 guest

cron