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
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
Revision: 7509
http://adempiere.svn.sourceforge.net/adempiere/?rev=7509&view=rev
Author: vpj-cd
Date: 2008-12-08 22:07:26 +0000 (Mon, 08 Dec 2008)
Log Message:
-----------
[ 2001910 ] Average Invoice Cost not created
http://sourceforge.net/tracker/index.php?func=detail&aid=2001910&group_id=176962&atid=879332
Modified Paths:
--------------
trunk/base/src/org/compiere/acct/Doc_Inventory.java
trunk/base/src/org/compiere/model/MInventory.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Kind regards
Victor Perez
www.e-evolution.com
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).
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
Merged 11678 to trunk in Revision: 11694
http://adempiere.svn.sourceforge.net/adempiere/?rev=11694&view=rev
Tony
Revision: 11726
http://adempiere.svn.sourceforge.net/adempiere/?rev=11726&view=rev
Author: vpj-cd
Date: 2010-03-18 20:15:24 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2001910&group_id=176962
Now Physical Inventory can be completed avoid if the cost are in zero. it allow that the operation is not stop.
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2001910
kind regards
Victor Perez
www.e-evolution.com
integrated revision 11726 to release with 11831
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).
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
Hi Mario, please review (and join if you want) related discussion here:
https://sourceforge.net/projects/adempiere/forums/forum/611161/topic/2093073
Starting with my comment #40
Regards,
Carlos Ruiz
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).