Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041175
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2019-06-25 18:102019-08-22 14:44
ReportergsuarezView Statuspublic 
Assigned Tocollazoandy4 
PriorityhighResolutionfixedFixed in Version3.0PR19Q4
StatusclosedFix in branchFixed in SCM revision1730269ab1e7
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041175: Incorrect date to get conversion rate in Valued Stock Report

DescriptionWhen the process "Valued Stock Report" is run for a given date (e.g. 21/06/2019) and a given currency, USD for example, and exists a conversion rate for this currency on that date (e.g. EUR -> USD, from 21/06/2019 to 21/06/2019 ) and not exists a conversion rate for the next day (22/06/2019 in this case), the process throws an error message saying "There is no conversion rate defined from (EUR-€) to (USD-$) for date '22-06-2019'....".
The process is executed for the date 21/06/2019 but the error message shows a different date 22/06/2019, and for that date there is no conversion date defined as the image attached shows.
Steps To ReproduceAn example to reproduce this issue
1- Define a conversion rate for currencies EUR to USD from 21/06/2019 to 21/06/2019. Make sure there is no conversion range for those currencies for the date 22/06/2019
2-Launch the "Valued Stock Report" for the USD currency, for any organization on date 21/06/2019. The process will throw a Servlet Exception saying "javax.servlet.ServletException: CODE=0ERROR: current transaction is aborted, commands ignored until end of transaction block" as the image attached shows.
3-Reopen the "Valued Stock Report" process window and the conversion rate error mentioned in the description will appear.
Proposed SolutionModify the "select" method of the ReportValuationStock_Data.xsql file, changing the COSTTYPE projection, using the date entered when executing the report, in date parameter of the C_CURRENCY_CONVERT_PRECISION function.

-The following is the projection that needs to be modified:

CASE a.iscostcalculated
     WHEN 'Y' THEN C_CURRENCY_CONVERT_PRECISION (P.COST,P.c_currency_id,?,to_date(?),NULL,A.AD_CLIENT_ID,?,'C')
     ELSE NULL END AS COSTTYPE
TagsNo tags attached.
Attached Filespng file icon ValuedStockReport.png [^] (30,523 bytes) 2019-06-25 18:10


png file icon ServletException.png [^] (21,103 bytes) 2019-06-25 18:11


png file icon ConversionRate-EUR-USD.png [^] (111,290 bytes) 2019-06-25 18:11


png file icon ConversionRateError.png [^] (46,194 bytes) 2019-06-25 18:11

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0113111)
collazoandy4 (reporter)
2019-06-28 15:50

Test Plan
 Make sure there is no conversion rate from EUR to USD for the next month
 Launch the "Valued Stock Report" for the USD currency, for any organization on last date of current month and check the process shows the records
 Check Consolidated warehouse option and Launch the report again and check the process shows the records
(0113138)
hgbot (developer)
2019-07-02 12:16

Repository: erp/devel/pi
Changeset: 1730269ab1e780d51603eca17df11c63c5e27b99
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu Jun 27 21:07:48 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/1730269ab1e780d51603eca17df11c63c5e27b99 [^]

Fixes issue 41175: Incorrect date to get conversion rate in Valued Stock Report

Use the date defined in the report to search for the conversion rate

---
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock_data.xsql
---
(0113139)
Sandrahuguet (developer)
2019-07-02 12:17

code review + testing ok
(0114132)
hudsonbot (developer)
2019-08-22 14:44

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/ad3efd3bd07c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2019-06-25 18:10 gsuarez New Issue
2019-06-25 18:10 gsuarez Assigned To => Triage Finance
2019-06-25 18:10 gsuarez File Added: ValuedStockReport.png
2019-06-25 18:10 gsuarez Modules => Core
2019-06-25 18:10 gsuarez Resolution time => 1562623200
2019-06-25 18:10 gsuarez Triggers an Emergency Pack => No
2019-06-25 18:11 gsuarez File Added: ServletException.png
2019-06-25 18:11 gsuarez File Added: ConversionRate-EUR-USD.png
2019-06-25 18:11 gsuarez File Added: ConversionRateError.png
2019-06-26 16:00 Sandrahuguet Assigned To Triage Finance => collazoandy4
2019-06-27 18:18 collazoandy4 Status new => scheduled
2019-06-28 15:50 collazoandy4 Note Added: 0113111
2019-07-02 12:16 hgbot Checkin
2019-07-02 12:16 hgbot Note Added: 0113138
2019-07-02 12:16 hgbot Status scheduled => resolved
2019-07-02 12:16 hgbot Resolution open => fixed
2019-07-02 12:16 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1730269ab1e780d51603eca17df11c63c5e27b99 [^]
2019-07-02 12:17 Sandrahuguet Review Assigned To => Sandrahuguet
2019-07-02 12:17 Sandrahuguet Note Added: 0113139
2019-07-02 12:17 Sandrahuguet Status resolved => closed
2019-07-02 12:17 Sandrahuguet Fixed in Version => 3.0PR19Q4
2019-08-22 14:44 hudsonbot Checkin
2019-08-22 14:44 hudsonbot Note Added: 0114132


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker