Menu

#1329 Average Invoice Cost not created

Core
closed
Costing (71)
9
2010-04-27
2008-06-24
moyses
No

Adempiere is not creating the initial record for the Average Invoice cost.

Usually you create a new client in Adempiere. Then you create the new products and import the initial qty available to the system.

The problem arises when you try to create the accounting details for this physical inventory. You receive the message that there is no cost for the product.

When you use the Standard cost method in Adempiere, the initial costing record for the product is automatically created by Adempiere, this is not happening with the Average Invoice cost method.

Best Regards

Discussion

  • moyses

    moyses - 2008-06-24
     
  • moyses

    moyses - 2008-07-01

    Logged In: YES
    user_id=1597230
    Originator: YES

    This bug was submited based on the following discussion:

    https://sourceforge.net/forum/message.php?msg_id=5036114

     
  • Carlos Ruiz

    Carlos Ruiz - 2010-01-28
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • Carlos Ruiz

    Carlos Ruiz - 2010-03-16
    • status: closed --> pending
     
  • Carlos Ruiz

    Carlos Ruiz - 2010-03-16

    The revision 7509 introduced a bug - completeIt method must return a status, not an error.

    Fixed with revision 11678
    http://adempiere.svn.sourceforge.net/adempiere/?rev=11678&view=rev

    Regards,

    Carlos Ruiz

     
  • Carlos Ruiz

    Carlos Ruiz - 2010-03-27

    integrated revision 11726 to release with 11831

     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • Mario Calderon

    Mario Calderon - 2010-04-11

    Hi,
    I suggest to consider reverting both Revisions 11726 and 11831.

    The reason: these revisions allow to complete an inventory even if there are no costs. At the end, MInventory.createCostDetail() calls MCostDetail.createInventory(), which creates a Cost Detail entry with costs==0.

    What happens when you try to post this inventory? DocInventory.createFacts() prevents to post when the product's cost amount from Cost Detail is==0. If you want to post the inventory, you must correct the costs anyway by reverting the inventory document or (god beware!) fumbling in the DB.

    Furthemore,in the balance are ignored any inventory differences due to the fact that the inventory has not been posted.

    IMHO it is better and "cleaner" to force in the first place to have product costs before doing anything with product.

    The call should be in line 973 (as before revisions 11726 and 11831) :
    costs = pc.getProductCosts(...., false); // zeroCostsOK=false
    }
    if (costs == null || costs.signum() == 0) // no costs -> no complete
    etc.

    I have created a FR regarding this very call. You can consider including it when working on this: https://sourceforge.net/tracker/?func=detail&aid=2985451&group_id=176962&atid=879335 .

    Best regards,
    Mario Calderon

     
  • Carlos Ruiz

    Carlos Ruiz - 2010-04-11
    • status: closed --> pending
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Log in to post a comment.