Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022763Openbravo ERP05. Production managementpublic2013-01-10 11:152013-03-05 13:29
VictorVillar 
ngarcia 
urgentmajoralways
closedfixed 
5
pi 
3.0MP21 
VictorVillar
OBPS
Core
18563
No
0022763: Wrong calculation of Cost value on Sales invoice dimensional Report
Wrong calculation of Cost value on Sales invoice dimensional Report.
When there are invoices for a product which their cost has not been calculated and they have different lines net amounts, the cost is calculated in a proportional manner from transactions with cost, and the formula used is:

SUM(CONVCOST)*SUM(CONVAMOUNT)/SUM(COSTEDAMT) END AS CONVCOST

Now the COSTEDAMT is calculated by the sum of all the line net amount for the invoices (transactions) which their cost has been calculated by the costing engine, but should be the sum of all the lines net amount of all the invoices.
On the subquery ZZ, it is possible to check it
As group admin role,

Create two orders/shipments/invoices, for one product, with different line net amount. These transactions will have cost. Date: Today

create three invoices without shipments associated, and different lines net amount. one invoice --> Date: today, the other two --> DAte: two days before

Now it is possible to check on subquery ZZ of the ReportInvoiceCustomerDimensionalAnalysesJRData.java
that the COSTEDAMT value is not correct, should be the sum of all the lines net amount of all the invoices grouped in this moment.
No tags attached.
related to defect 00227563.0MP21 closed ioritzCia Wrong behaviour in the sales invoice dimensional report 
Issue History
2013-01-10 11:15VictorVillarNew Issue
2013-01-10 11:15VictorVillarAssigned To => dmiguelez
2013-01-10 11:15VictorVillarModules => Core
2013-01-10 11:15VictorVillarOBNetwork customer => Yes
2013-01-10 11:15VictorVillarSupport ticket => 18563
2013-01-10 11:15VictorVillarResolution time => 1359846000
2013-01-10 11:15VictorVillarTriggers an Emergency Pack => No
2013-01-10 11:16VictorVillarIssue Monitored: networkb
2013-01-10 18:42jonalegriaesarteAssigned Todmiguelez => ngarcia
2013-02-04 16:52jonalegriaesarteTarget Version3.0MP20 => 3.0MP21
2013-02-20 18:39hgbotCheckin
2013-02-20 18:39hgbotNote Added: 0056652
2013-02-20 18:39hgbotStatusnew => resolved
2013-02-20 18:39hgbotResolutionopen => fixed
2013-02-20 18:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9cc2d186f5adfc50cbb3c22501524e195b357938 [^]
2013-02-21 17:48hudsonbotCheckin
2013-02-21 17:48hudsonbotNote Added: 0056700
2013-03-01 13:21ioritzCiaRelationship addedrelated to 0022756
2013-03-05 13:29VictorVillarReview Assigned To => VictorVillar
2013-03-05 13:29VictorVillarNote Added: 0057047
2013-03-05 13:29VictorVillarStatusresolved => closed

Notes
(0056652)
hgbot   
2013-02-20 18:39   
Repository: erp/devel/pi
Changeset: 9cc2d186f5adfc50cbb3c22501524e195b357938
Author: Naiara Garcia <naiara.garcia <at> openbravo.com>
Date: Wed Feb 20 12:40:11 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9cc2d186f5adfc50cbb3c22501524e195b357938 [^]

Fixed issue 22763: Wrong calculation of Cost value on Sales invoice dimensional
 Report

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR_data.xsql
---
(0056700)
hudsonbot   
2013-02-21 17:48   
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/2add4de9509d [^]

Maturity status: Test
(0057047)
VictorVillar   
2013-03-05 13:29   
Veririfed