Menu

Can the FIFO(cost method) work now ?

Developers
wu chunwei
2009-05-01
2013-03-08
  • wu chunwei

    wu chunwei - 2009-05-01

    Hi ,
       Can the FIFO(cost method) work normally  in the Adempiere3.42S  now ?
       thanks.
           

     
    • moyses

      moyses - 2009-05-01

      Not yet there are still issues with the adempiere costing engine.

      Regards

       
      • Armen Rizal (Goodwill)

        You can try using Average method with costing level Batch. For every product attributte you have, it will hold its own cost price which is, in some cases, more actual than using FIFO.

        Armen
        Goodwill.co.id

         
    • vinhpt

      vinhpt - 2009-05-06

      Hi developers!
      Any one know about how the current cost engine work??? Please help to explain more in detail???
      So I and every one can help to correct the current cost engine.
      May be it is difficult with someone can correct the current cost engine (because it is quite complex) but with everyone in our community I believe we can solve this BIG problem.

       
      • Teo Sarca

        Teo Sarca - 2009-05-06

        Hi,

        Take a look here: http://www.adempiere.com/index.php/Sponsored_Development:_Costing_Enhancement
        We just started, and with the help of community we can finish soon. See you there ;)

        Best regards,
        Teo Sarca

         
    • vinhpt

      vinhpt - 2009-05-06

      Hi Teo
      Can  you explain more about the classes:

      MCost
      MCostDetail
      MCostQueue

       
      • Teo Sarca

        Teo Sarca - 2009-05-06

        Hi,

        At a glance, here is what you should expect from those data structures & terms:
        * M_Cost - here we store current cost for our costing dimension(Product,Tenant/Org/ASI). In case of FIFO/LIFO the CurrentCostPrice column is not the real current cost because the current costs depends on how many items we ship

        * M_CostDetail - here we store (or we should store) the cost detail. Something similar with M_Transaction but regarding costs. This information is useful for posting, history and for reversing a MM document

        * M_CostQueue - used ONLY for FIFO/LIFO costing method. Here we store the Qty x Price pairs. We insert in this table on each income and we alter the Qtys (decrease them) on each outgoing transaction.

        Hope it helps. More to come!

        Best regards,
        Teo Sarca - www.arhipac.ro

         
        • Anh Han

          Anh Han - 2009-05-06

          Hi,

          We tested FIFO some months ago, and we knew that cost layers (queues) are wrong. We would like to participate in this improvement. I'll contact you later for our contribution :)

          As for history and reversing a MM document, do you think we should implement part of Victor Perez Juarez's proposal, i.e adding effective cost price for each transaction:

          https://sourceforge.net/forum/forum.php?thread_id=3022355&forum_id=610546

          "The new fields that I want adding are next:

          CurrentCostPrice: 
          CurrentCostPriceLL

          This new fields allow know what was the cost that was used for register of this transaction, is very useful when we need to create a transaction reversal or Inventory Valuation effective date."

          I know that effective cost can be deprived from transactional documents (if I remember correctly, Hengsin proposed a workaround for computing that cost), but having it in the table will help getting historical cost for reversal of MM document (or RMA) easily. I just wonder if we can implement it asap.

          Anh Han

           
          • Armen Rizal (Goodwill)

            Hi,

            Yes, it is very needed. +1

            For analytical and audit purposes, in implementation I usually added those columns you propose in M_Transaction table.

            Regards,

            Armen

             
        • Victor Perez Juarez

          Hi Team!

          I added a new section in wiki page, The reason is because I think we need first an accord the business logic before the go to developer, so here I hope it can be useful

          http://www.adempiere.com/index.php/Sponsored_Development:_Costing_Enhancement#Business_Case_.26_Issue

          Kind regards
          ---
          Víctor Perez Juarez
          www.e-evolution.com

           
    • vinhpt

      vinhpt - 2009-05-07

      Hi Teo!

      Thanks for your information about the 3 main costing class. I have study the code of them and I found the the complicate is coming from the AttributeSetInstance.

      I think the AttributeSetInstance also have problem. And if you please explain more about AttributeSetInstance? Why it involve in costing engine? Can I remove this for easier to test the costing engine?

       
      • martin (Ntier Software Services)

        HI

        AttributeSetInstance is usually a Batch.  Some companies would like to track costing per batch.

        Thanks

        Martin

        www.ntier.co.za

         
    • Alexander  Pohl

      Alexander Pohl - 2009-05-10

      ... or for companies using one product number with multiple attributes, like colours, sizes!
      They wish to know, how much did they based on yellow or XXL, just as an example ...
      Cheers, Alexander

       
    • vinhpt

      vinhpt - 2009-06-03

      Hi!

      " * M_CostQueue - used ONLY for FIFO/LIFO costing method. Here we store the Qty x Price pairs. We insert in this table on each income and we alter the Qtys (decrease them) on each outgoing transaction. "

      I have see the code in method MCostDetail.process()

      if (ce.isFifo() || ce.isLifo()) {
        MCostQueue cq = MCostQueue.get(product, getM_AttributeSetInstance_ID(),
          as, Org_ID, ce.getM_CostElement_ID(), get_TrxName());
        cq.setCosts(amt, qty, precision);
        cq.save();
        ...
      }

      It is mean:
      Step 1. Call the MCostQueue.get() method to get the existing cost queue or create new (if no exitsting cost queue found)

      Step 2. Update the current cost and current qty of the cost queue at step 1 using MCostQueue.setCosts() method.

      Compare to the definition of MCostQueue class I guest the Step 1 is do the wrong. It must create a new cost queue instead of find to get the existing cost queue. And the step 2 is also do the wrong. The method MCostQueue.setCosts() is update the current cost and current qty of the cost queue exactlly as the way of Avegare Costing.

      What developer think? Share the opinion please.

       
    • Anh Han

      Anh Han - 2009-06-05

      I have one question relating to physical inventory for FIFO costing method:

      If after physical count, we find that a product is surplus (actual quantity > book quantity), which cost will we use to record that transaction?

      Regards,
      Anh Han

       

Log in to post a comment.

MongoDB Logo MongoDB