Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005610Openbravo ERP04. Warehouse managementpublic2008-10-22 10:292009-03-05 10:54
nataliaperu 
gorkaion 
immediateminoralways
closedopen 
5
2.40 
2.40MP3 
Core
No
0005610: Generate Average costs process does not calculate correctly the average
When an order contains two lines with the same product and one of them has price 0, the process does not take into account the product with price 0.
Comment the following lines in GENERATE_AVERAGE_COST procedure:

      --IF(Cur_InOutLine.MOVEMENTDATE=v_DateOld AND Cur_InOutLine.M_PRODUCT_ID=v_ProductOld) THEN
        v_CumQty:=v_CumQty + Cur_InOutLine.MOVEMENTQTY;
     -- END IF;
comsup_sprint5
blocks defect 0005525 closed gorkaion Generate Average costs process does not calculate correctly the average 
Issue History
2008-10-22 10:29psarobeNew Issue
2008-10-22 10:29psarobeAssigned To => gorkaion
2008-10-22 10:29psarobeStatusnew => scheduled
2008-10-22 12:26villindIssue Monitored: villind
2009-01-19 10:09rafarodaversion => 2.40
2009-01-29 15:45networkbPrioritynormal => immediate
2009-01-29 18:17svnbotCheckin
2009-01-29 18:17svnbotNote Added: 0012853
2009-01-29 18:17svnbotStatusscheduled => resolved
2009-01-29 18:17svnbotResolutionopen => fixed
2009-01-29 18:17svnbotsvn_revision => 12515
2009-02-06 01:17gorkaionTag Attached: comsup_sprint5
2009-03-03 17:32psarobeFixed in Version => 2.40MP3
2009-03-04 06:36arunkumarStatusresolved => new
2009-03-04 06:36arunkumarResolutionfixed => open
2009-03-04 06:36arunkumarNote Added: 0014346
2009-03-04 06:36arunkumarFixed in Version2.40MP3 =>
2009-03-05 10:54psarobeStatusnew => scheduled
2009-03-05 10:54psarobeFixed in Version => 2.40MP3
2009-03-05 10:54psarobeStatusscheduled => resolved
2009-03-05 10:54psarobeRegression testing => No
2009-03-05 10:54psarobeStatusresolved => closed

Notes
(0012853)
svnbot   
2009-01-29 18:17   
Repository: openbravo
Revision: 12515
Author: gorkaion
Date: 2009-01-29 18:17:58 +0100 (Thu, 29 Jan 2009)

Fixed bug 5610. Applied the proposed solution removing the if clause.

---
U branches/r2.40/src-db/database/model/functions/GENERATE_AVERAGE_COSTS.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=12515&sc=1 [^]
(0014346)
arunkumar   
2009-03-04 06:36   
I have created a purchase order with two lines.
Line 10 : Boots with price 27
Line 20 : Boots with price 0

I created purchase order and goods receipt.

I ran "Generate Average Costs". Then "Valued Stock Report"

This process does not take into account the product with price 0. It considers only 27.