Sponsored Development: Costing Enhancement

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

Proposal

To review and enhance the costing module.

This project was move to a new page because is necessary a reimplementation of the cost engine to get more detail see this link Libero Cost Engine

Project Team

Sponsors

http://www.sysnova.com

Functional Specs

Project Tasks

  1. Define pseudocode for costing methodologies
    1. FIFO: https://adempiere.svn.sourceforge.net/svnroot/adempiere/branches/fix_fifo_costing/
    2. LIFO: https://adempiere.svn.sourceforge.net/svnroot/adempiere/branches/fix_fifo_costing/
    3. Standard costing
    4. Retail costing
    5. Average Cost
  2. Define test data set (see http://spreadsheets.google.com/pub?key=p_F3GDtQxWTA9YbH8MRkyKA&gid=0 )
    1. Another example added by Ntier : We will be happy to assist with this. Note that the inventory account balance = available stock * current cost price at any time. (Comments) http://www.adempiere.com/images/7/71/StockEvaluationWithReversal.xls
  3. Define automated tests (see http://adempiere.svn.sourceforge.net/svnroot/adempiere/trunk/extend/src/test/functional/inventory/InventoryTest.java )
  4. Review codebase and test
  5. Take remedial action
  6. Test & Review

Developers

Testers

Proof of Concept (POC)

  • Here is a suggested POC which is quite a complex business case to test and review this functionality. The successful resolution of this case shall prove the concept sufficiently to proceed with the development.

Business Case for Food & Chemical Industry

GardenWorld opens a new plant to manufacture Furniture and using a raw material called Ultra Glue, In this business case this product have a life of 10 days so the supply requires strict control to avoid getting alot of scrap. Ultra Glue is purchased from Chemical Product, for a price of 0.005 per milliliter and the time to live is for 10 days.

Requirements

  • The Material costing policy for perishable goods is First In, First Out (FIFO)
  • The Production Manager sets at least 3 days before the product expires.
  • The Accountant need to have multiple Costing Methods. This case needs a Costing Method for all raw materials that are perishable. The Standard Cost is set for Manufacturing Product similar to the Patio Chair.

Example & Implementation

We then proceed to create the environment to implement the business case of Ultra Glue product in the Garden World.

  • Change the Costing Method to FIFO
  • Change the Material Policy to Raw Material Product Category
  • Create a new Attribute Set( AS) called "Ultra Glue AS" to enable the Lot and Guarantee Date Mandatory Lot, Always and Mandatory Mandatory Guarantee Date
  • Create a new Lot Control called "Ultra Glue Lot"
  • Set the AS to Ultra Glue product, Gurrantee Days 10 and Min Gurrantee Day 3
  • Create a new Purchase Order(PO1) Date Order 06/05/2009 Business Partner(BP) Chemical Product, Inc with single line to Ultra Glue product for 10,000 Mililiter with a price of .005 by Milliliter.
  • Create a new Purchase Order(PO2) Date Order 06/05/2009 Business Partner(BP) Chemical Product, Inc with single line to Ultra Glue product for 5,000 Milliliter with a price of .006 by Mililiter.
  • Create a new Material Receipt:
Date                       Lot              Guarantee Date               Quantity                Purchase Order
05/05/2009           100             05/15/2009                    3,000                    PO1
05/06/2009           101             05/14/2009                    9,000                    PO1 & PO2
05/07/2009           102             05/16/2009                    3,000                    PO2


Let me give you an example about how this may work with the case:

Accounting cost method: FIFO Material Policy: FIFO

For me the correct FIFO COGS should be:

Layer         Quantity                Price
1                  3,000                  0.005
2                  6,000                  0.005

Total COGS 9000*.005 = 45

So the layers may end up like this:

Final Stock Physical Material Layer

Layer           Lot              Quantity                Guarantee Date
1                 100              3,000                          05/15/2009
4                 102              3,000                          05/16/2009 

Final stock Costing FIFO Layer

Layer         Quantity                Price
2                 1,000                    0.005
3                 2,000                    0.006
4                 3,000                    0.006

But may have something like this:

Accounting cost method: LIFO Material Policy: FIFO

For me the correct LIFO COGS should be:

Layer           Lot              Quantity                Price
2                  101             4,000                    0.005
3                  101             2,000                    0.006
4                  102             3,000                    0.006

Total COGS (5000*.006) + (4000*.005) = 50

Final Stock Physical Material Layer (the same as the previous example)

Layer           Lot              Quantity                Guarantee Date
1                 100              3,000                          05/15/2009
4                 102              3,000                          05/16/2009


Final stock Costing LIFO Layer

 Layer        Quantity                Price
 1                 3,000                    0.005
 2                 3,000                    0.005

FAQ

When I reviewed the FIFO/LIFO cost found Questions and Cases :

Well is here where I have some doubt about the Business Logic:

We need define the strategy about that How should work the Material Policy and Costing Method, current do not is clear?

I think that the Material Policy and Costing Method should work the way independent so that in general the Material Policy is focus to the logic material issue and the costing method is focus to Cost Account
Victor Perez
www.e-evolution.com
  • What is the logic to consumed the FIFO/LIFO Cost Layers , we should sort by?
    • Account Date
    • Movement Date
    • ID ASI
    • Guarantee Date
I think that for FIFO/LIFO Cost Layers should be consumed based in the Account Date , the reason is because exist a lot the business that can entry your material movement in time left. other important reason is because when you revert some document it should reverting using the same date that original document and the same original cost. so this way we can complaint the requirement the Accountant Costs.
Victor Perez
www.e-evolution.com
  • What is the Logic to consumed the Material considering the Material Policy?
    • Accounts Date
    • Movement Date
    • ID ASI
    • Guarantee Date
I think that the FIFO/LIFO Material Policy should be consumed based in of the Guarrantee Date and discarding the Layer that do not have complaint with the Min Guarantee Days , next we would use the Movement Date. The reason is because the must important for this business case is that the raw material more old and a good status should be issue first. this way we can complaint the requirement the Production man.
Victor Perez
www.e-evolution.com
  • We should mix the Material Policy FIFO/LIFO with Costing Method FIFO/LIFO?
No I think that the Material Policy FIFO/LIFO and Costing Method FIFO/LIFO are different , the first is focus to material and next to Cost. So I think that we need change the current logic where the Material Policy FIFO/LIFO is use to calculate the Cost.
Victor Perez
www.e-evolution.com
  • We should adding the costing method to level Product Category the same way that Material Policy?
Yes, is very necessary so that exist business that need have a costing method for specific Product Category. Here I do not sure if with different account cost.
Victor Perez
www.e-evolution.com
  • We should create a record into Cost Detail for each Cost Element and Material Transaction?
Yes, I think that it would be very useful to implement the FIFO/LIFO cost in Manufacturing Cost and can use other Cost Element Type as (Labor, Burden , Overhead , Outside Processing, etc),
Victor Perez
www.e-evolution.com
  • We should include the Current Cost Price and Current Cost Price LL into Cost Detail?
Yes, I think that it would be very useful to implement report Effective Date Valuation, Calculate Cost Revelation and Reversal Documents
Victor Perez
www.e-evolution.com
  • We should include the account date in the logic to Costing Method FIFO/LIFO?
Yes,I think that is very important it date is mandatory to create reversal and correction cost for error in entry quantity.
Victor Perez
www.e-evolution.com
  • How should include the landed cost be based on the FIFO/LIFO Costing Method?

References

Vote for inclusion in Trunk