Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005525Openbravo ERP04. Warehouse managementpublic2008-10-14 19:082009-04-21 12:39
nataliaperu 
gorkaion 
immediateminoralways
closedfixed 
5
2.40 
 
Core
No
0005525: 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
depends on backport 0005610 closed gorkaion Generate Average costs process does not calculate correctly the average 
depends on backport 0005611 closed gorkaion Generate Average costs process does not calculate correctly the average 
Issue History
2008-10-14 19:08nataliaperuNew Issue
2008-10-14 19:08nataliaperuAssigned To => cromero
2008-10-14 19:08nataliaperusf_bug_id0 => 2166412
2008-10-20 11:24psarobeNote Added: 0009644
2008-10-20 11:24psarobeStatusnew => feedback
2008-10-22 10:29psarobeStatusfeedback => scheduled
2008-10-22 10:29psarobeNote Added: 0009672
2008-10-22 10:29psarobeAssigned Tocromero => gorkaion
2008-10-22 10:29psarobefix_in_branch => trunk
2008-11-06 12:52olliNote Added: 0010034
2009-01-19 10:09rafarodaversion => 2.40
2009-01-19 10:09rafarodafix_in_branchtrunk =>
2009-01-29 16:58rafarodaPrioritynormal => immediate
2009-01-29 18:16svnbotCheckin
2009-01-29 18:16svnbotNote Added: 0012852
2009-01-29 18:16svnbotStatusscheduled => resolved
2009-01-29 18:16svnbotResolutionopen => fixed
2009-01-29 18:16svnbotsvn_revision => 12514
2009-02-06 01:17gorkaionTag Attached: comsup_sprint5
2009-04-21 12:39psarobeStatusresolved => closed

Notes
(0009644)
psarobe   
2008-10-20 11:24   
Please we need more feedback for you proposed solution
(0009672)
psarobe   
2008-10-22 10:29   
Gorka when fix the bug write an explanation of what to do for cheking that the bug has been really fixed
(0010034)
olli   
2008-11-06 12:52   
I have a different problem but the solution is the same. The problem occurs when there are two goods receipts containing the same product in the same day. The procedure doesn't increment the v_CumQty when calculating the first line, because Cur_InOutLine.M_PRODUCT_ID=v_ProductOld is false. That's why the quantity of the first line is not taken into account.
(0012852)
svnbot   
2009-01-29 18:16   
Repository: openbravo
Revision: 12514
Author: gorkaion
Date: 2009-01-29 18:16:13 +0100 (Thu, 29 Jan 2009)

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

---
U trunk/src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=12514&sc=1 [^]