Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019152Openbravo ERP05. Production managementpublic2011-11-23 15:552011-12-22 03:53
maite 
jecharri 
highminoralways
closedfixed 
5
 
3.0MP73.0MP7 
Core
No
0019152: Error in Production Cost Report query
Error in Production Cost Report query
Realize that ReportProductionCost_data.xsql, in "selectMaterial" query, in "rpn" subquery is multiplying by "pl.MovementQty" when calculating "CalcCost", and it should not.
substitute "CalcCost" in "rpn" subquery by:

SUM(C_CURRENCY_CONVERT(pl.CalcCost, ?, ?, TO_DATE(p.movementdate), null, pl.ad_client_id, pl.ad_org_id))/SUM(pl.MovementQty) AS CalcCost

instead of

SUM(pl.MovementQty*C_CURRENCY_CONVERT(pl.CalcCost, ?, ?, TO_DATE(p.movementdate), null, pl.ad_client_id, pl.ad_org_id))/SUM(pl.MovementQty) AS CalcCost
No tags attached.
depends on backport 00191532.50MP38 closed jonalegriaesarte Error in Production Cost Report query 
Issue History
2011-11-23 15:55maiteNew Issue
2011-11-23 15:55maiteAssigned To => jonalegriaesarte
2011-11-23 15:55maiteModules => Core
2011-11-23 15:55maiteIssue Monitored: networkb
2011-11-23 16:14maiteStatusnew => scheduled
2011-11-23 16:14maitefix_in_branch => pi
2011-12-16 11:19jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2011-12-19 17:54hgbotCheckin
2011-12-19 17:54hgbotNote Added: 0043953
2011-12-19 17:54hgbotStatusscheduled => resolved
2011-12-19 17:54hgbotResolutionopen => fixed
2011-12-19 17:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6a8a0f555ee54cb71b7056cbebc5ab6f96d8bbb7 [^]
2011-12-20 11:35maiteNote Added: 0043971
2011-12-20 11:35maiteStatusresolved => closed
2011-12-20 11:35maiteFixed in Version => 3.0MP7
2011-12-22 03:53hudsonbotCheckin
2011-12-22 03:53hudsonbotNote Added: 0043993

Notes
(0043953)
hgbot   
2011-12-19 17:54   
Repository: erp/devel/pi
Changeset: 6a8a0f555ee54cb71b7056cbebc5ab6f96d8bbb7
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Mon Dec 19 10:18:32 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6a8a0f555ee54cb71b7056cbebc5ab6f96d8bbb7 [^]

Fixes issue 19152: Error in Production Cost Report query

---
M src/org/openbravo/erpCommon/ad_reports/ReportProductionCost_data.xsql
---
(0043971)
maite   
2011-12-20 11:35   
verified
(0043993)
hudsonbot   
2011-12-22 03:53   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9ac5e6f282ca [^]

Maturity status: Test