Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019771Openbravo ERP07. Sales managementpublic2012-02-14 21:052012-06-28 08:01
pjuvara 
jecharri 
normalcriticalalways
closedfixed 
5
3.0MP7.1 
3.0MP9 
Core
No
0019771: Wrong conversion rate used in the Sales Dimensional Report
The Sales Dimensional Report considers the wrong exchange rate for sales orders that are placed at the edge of the validity period of a conversion rate.

For example:
* Conversion rate from USD to EUR from 01-01-2011 to 31-01-2011 is 1.25.
* Conversion rate from USD to EUR from 01-02-2011 to 31-12-2012 is 1.335.

A sales order placed on 31-01-2011 in USD should use exchange rate 1.25 when reporting in EUR.

Instead, the system uses 1.335.

This issue is critical as it can result in the overstatement / understatement of the financial results of the company.
See above.

An example of this can be seen running the Sales Dimensional Report in OB/OB for the period of January 2011 and for category B - XXXX (omitted for confidentiality) where an order of 1440 USD is reported as 1071.16 EUR when it should be 1144.00 EUR.
No tags attached.
Issue History
2012-02-14 21:05pjuvaraNew Issue
2012-02-14 21:05pjuvaraAssigned To => jonalegriaesarte
2012-02-14 21:05pjuvaraModules => Core
2012-02-15 02:57pjuvaraNote Added: 0045135
2012-02-15 12:11jonalegriaesarteNote Added: 0045143
2012-02-15 12:11jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2012-02-15 18:03hgbotCheckin
2012-02-15 18:03hgbotNote Added: 0045160
2012-02-15 18:03hgbotStatusnew => resolved
2012-02-15 18:03hgbotResolutionopen => fixed
2012-02-15 18:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a7e9e2f864a2c24a0b79478eba5758357a3441c7 [^]
2012-02-20 19:03hgbotCheckin
2012-02-20 19:03hgbotNote Added: 0045281
2012-02-20 19:04hgbotCheckin
2012-02-20 19:04hgbotNote Added: 0045284
2012-03-01 15:29hgbotCheckin
2012-03-01 15:29hgbotNote Added: 0045668
2012-03-02 11:08hgbotCheckin
2012-03-02 11:08hgbotNote Added: 0045694
2012-03-02 11:17egoitzStatusresolved => closed
2012-03-02 11:17egoitzFixed in Version => 3.0MP9
2012-03-02 15:37hudsonbotCheckin
2012-03-02 15:37hudsonbotNote Added: 0045860
2012-03-02 15:38hudsonbotCheckin
2012-03-02 15:38hudsonbotNote Added: 0045898
2012-03-02 15:38hudsonbotCheckin
2012-03-02 15:38hudsonbotNote Added: 0045901
2012-03-02 15:40hudsonbotCheckin
2012-03-02 15:40hudsonbotNote Added: 0046013
2012-04-01 20:30hgbotCheckin
2012-04-01 20:30hgbotNote Added: 0046997
2012-04-01 20:36hudsonbotCheckin
2012-04-01 20:36hudsonbotNote Added: 0047027
2012-06-27 20:23hgbotCheckin
2012-06-27 20:23hgbotNote Added: 0050202
2012-06-28 08:01hudsonbotCheckin
2012-06-28 08:01hudsonbotNote Added: 0050228

Notes
(0045135)
pjuvara   
2012-02-15 02:57   
The root cause of this problem might not be the one explained in the description.

Another possibility is that there is data corruption in the system and the order date denormalized at order line level does not match the order date at header level.

It is not yet clear why there is data corruption (it might be the result of an incorrect update done by a system administrator directly in the database).

In any case, the Sales Dimensional Report should not consider the order date at line level but the order date at header level.
(0045143)
jonalegriaesarte   
2012-02-15 12:11   
All the dimensional reports should use the date of the header. Actually these reports use the date of the line. Please, review all the reports to follow this approach.
(0045160)
hgbot   
2012-02-15 18:03   
Repository: erp/devel/pi
Changeset: a7e9e2f864a2c24a0b79478eba5758357a3441c7
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Wed Feb 15 18:02:22 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a7e9e2f864a2c24a0b79478eba5758357a3441c7 [^]

Fixes issue 19771: Wrong conversion rate used in the Sales Dimensional Report.
Now, the date ordered of the header will be considered to calculate the conversion

---
M src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR_data.xsql
---
(0045281)
hgbot   
2012-02-20 19:03   
Repository: erp/devel/pi
Changeset: d3b332e4c361f2c4fc65a5844a6fdf512df52d75
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Thu Feb 16 13:21:57 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d3b332e4c361f2c4fc65a5844a6fdf512df52d75 [^]

issue 19771: Wrong conversion rate used in the Sales Dimensional Report.
We find more reports with the same problem.

---
M src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR_data.xsql
M src/org/openbravo/erpCommon/ad_reports/SimpleDimensionalComparative.jrxml
M src/org/openbravo/erpCommon/ad_reports/SimpleDimensionalNoComparative.jrxml
M src/org/openbravo/erpCommon/ad_reports/WeightDimensionalComparative.jrxml
M src/org/openbravo/erpCommon/ad_reports/WeightDimensionalNoComparative.jrxml
---
(0045284)
hgbot   
2012-02-20 19:04   
Repository: erp/devel/pi
Changeset: 15271104ea083ecd2e574fa2c0139e825db0ca98
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Sat Feb 18 14:51:00 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/15271104ea083ecd2e574fa2c0139e825db0ca98 [^]

issue 19771: Wrong conversion rate used in the Sales Dimensional Report.
We find more reports with the same problem, and apart from that, we have put the column c_orderline.dateordered like deprecated

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src/org/openbravo/erpCommon/ad_reports/OrderEdition_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml
M src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoicedJasper.jrxml
M src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoiced_data.xsql
M src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.jrxml
M src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.jrxml
M src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql
---
(0045668)
hgbot   
2012-03-01 15:29   
Repository: erp/devel/pi
Changeset: 58416f7da58b7e79423ca1df871301402fb71105
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Thu Mar 01 15:29:20 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/58416f7da58b7e79423ca1df871301402fb71105 [^]

issue 19771:
we have found one more place where it was using the lines date

---
M src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
---
(0045694)
hgbot   
2012-03-02 11:08   
Repository: erp/devel/pi
Changeset: 2c8bfb9c6bc04fc15caf6a54f40da658f7bc038b
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Fri Mar 02 11:08:16 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2c8bfb9c6bc04fc15caf6a54f40da658f7bc038b [^]

issue 19771:
Finally the column is not going to be drepecated because it is necessary in MRP module and process

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0045860)
hudsonbot   
2012-03-02 15:37   
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/544d64e0c159 [^]

Maturity status: Test
(0045898)
hudsonbot   
2012-03-02 15:38   
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/544d64e0c159 [^]

Maturity status: Test
(0045901)
hudsonbot   
2012-03-02 15:38   
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/544d64e0c159 [^]

Maturity status: Test
(0046013)
hudsonbot   
2012-03-02 15:40   
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/544d64e0c159 [^]

Maturity status: Test
(0046997)
hgbot   
2012-04-01 20:30   
Repository: erp/devel/pi
Changeset: 43fcb7bbd767d6eaaf9b390a8d258f6e94f63bcb
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Fri Mar 02 11:08:16 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/43fcb7bbd767d6eaaf9b390a8d258f6e94f63bcb [^]

issue 19771:
Finally the column is not going to be drepecated because it is necessary in MRP module and process

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0047027)
hudsonbot   
2012-04-01 20:36   
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/640de9acc2d5 [^]

Maturity status: Test
(0050202)
hgbot   
2012-06-27 20:23   
Repository: erp/devel/pi
Changeset: 961dca164c31a3701bfc6095098e850f0a125792
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Thu Mar 01 15:29:20 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/961dca164c31a3701bfc6095098e850f0a125792 [^]

issue 19771:
we have found one more place where it was using the lines date

---
M src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
---
(0050228)
hudsonbot   
2012-06-28 08:01   
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/c66e853c5cf4 [^]

Maturity status: Test