Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019153Openbravo ERP05. Production managementpublic2011-11-23 15:552012-01-04 11:08
maite 
jonalegriaesarte 
highminoralways
closedfixed 
5
 
2.50MP38 
Core
No
0019153: 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.
blocks defect 00191523.0MP7 closed jecharri Error in Production Cost Report query 
Issue History
2011-11-23 16:14maiteTypedefect => backport
2011-11-23 16:14maitefix_in_branch => 2.50
2011-11-23 16:14maiteTarget Version3.0MP7 => 2.50MP38
2012-01-03 18:17hgbotCheckin
2012-01-03 18:17hgbotNote Added: 0044103
2012-01-03 18:17hgbotStatusscheduled => resolved
2012-01-03 18:17hgbotResolutionopen => fixed
2012-01-03 18:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/5d67930d2f9e84fe32790a58bea02170b4962aba [^]
2012-01-04 11:08maiteNote Added: 0044109
2012-01-04 11:08maiteStatusresolved => closed

Notes
(0044103)
hgbot   
2012-01-03 18:17   
Repository: erp/stable/2.50
Changeset: 5d67930d2f9e84fe32790a58bea02170b4962aba
Author: Jon Alegría <jon.alegria <at> openbravo.com>
Date: Tue Jan 03 18:17:04 2012 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/5d67930d2f9e84fe32790a58bea02170b4962aba [^]

Fixes issue 0019153: Error in Production Cost Report query

---
M src/org/openbravo/erpCommon/ad_reports/ReportProductionCost_data.xsql
---
(0044109)
maite   
2012-01-04 11:08   
verified