Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034661Openbravo ERP09. Financial managementpublic2016-11-30 22:182016-12-16 18:39
rbianchini 
alekosmp86 
normalmajoralways
closedfixed 
5
3.0PR16Q3.3 
3.0PR17Q1 
dmiguelez
Core
No
0034661: You can set 2 conversion rate in the same period
In conversion rates window, it is possible to define different conversion rates to the same currency in the same period. It is also reproducible in pi
1 - Go to Conversion Rates window
2 - Create a new record:
A - Currency: EUR
B - To Currency: ARS
C - Valid from: 30/11/2016
D - Valid to: 30/11/2016
E - set the rates and save
3 - Create a new record:
A - Currency: EUR
B - To Currency: ARS
C - Valid from: 28/11/2016
D - Valid to: 28/11/2201
E - set the rates and save
4 - Realize that no error is shown, and for 31/11/2016 are 2 conversion rates defined.
Check overlapping conversion rates with an event handler.
No tags attached.
related to feature request 0006914 acknowledged eduardo_Argal Conversion rates - multiple issues 
related to defect 0030423 scheduled Sanjota It would be fine if Currency Conversion Rates could be defined to be valid from and to an specific hour and not only date 
Issue History
2016-11-30 22:18rbianchiniNew Issue
2016-11-30 22:18rbianchiniAssigned To => Triage Finance
2016-11-30 22:18rbianchiniModules => Core
2016-11-30 22:18rbianchiniResolution time => 1482289200
2016-11-30 22:18rbianchiniTriggers an Emergency Pack => No
2016-11-30 23:27aferrazRelationship addedrelated to 0006914
2016-11-30 23:27aferrazRelationship addedrelated to 0030423
2016-11-30 23:37aferrazResolution time1482289200 => 1482274800
2016-11-30 23:37aferrazSeveritycritical => major
2016-11-30 23:38aferrazProposed Solution updated
2016-11-30 23:38aferrazAssigned ToTriage Finance => collazoandy4
2016-12-02 16:46alekosmp86Assigned Tocollazoandy4 => alekosmp86
2016-12-02 16:47alekosmp86Statusnew => scheduled
2016-12-05 16:09alekosmp86Note Added: 0092094
2016-12-09 10:49hgbotCheckin
2016-12-09 10:49hgbotNote Added: 0092239
2016-12-09 10:49hgbotStatusscheduled => resolved
2016-12-09 10:49hgbotResolutionopen => fixed
2016-12-09 10:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d008b46f932c1f562b9d24aa2ede7adbfd8f0ce6 [^]
2016-12-09 10:49dmiguelezReview Assigned To => dmiguelez
2016-12-09 10:49dmiguelezNote Added: 0092240
2016-12-09 10:49dmiguelezStatusresolved => closed
2016-12-12 18:04aferrazFixed in Version => 3.0PR17Q1
2016-12-16 18:39hudsonbotCheckin
2016-12-16 18:39hudsonbotNote Added: 0092694

Notes
(0092094)
alekosmp86   
2016-12-05 16:09   
Test Plans for this issue

Log in as F&B International GroupAdmin

Test plan 1 (when the range of dates of the new conversion rate fully overlaps an existing conversion rate)
   Go to Conversion Rates screen
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-05
         Valid To Date: 2016-12-07
      Save the document
      
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-01
         Valid To Date: 2016-12-10
      Try save the document
Notice there's an error showing that there are two conversion rates for the same currency
in the same period of time.

Test plan 2 (when the range of dates of the new conversion rate overlaps an existing conversion rate by being defined inside its range of dates)
   Go to Conversion Rates screen
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-05
         Valid To Date: 2016-12-07
      Save the document
      
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-06
         Valid To Date: 2016-12-06
      Try save the document
Notice there's an error showing that there are two conversion rates for the same currency
in the same period of time.

Test plan 3 (when the range of dates of the new conversion rate partially overlaps an existing conversion rate)
   Go to Conversion Rates screen
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-05
         Valid To Date: 2016-12-07
      Save the document
      
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-01
         Valid To Date: 2016-12-06
      Try save the document
Notice there's an error showing that there are two conversion rates for the same currency
in the same period of time.

Test plan 4 (when the range of dates of the new conversion rate does not overlap an existing conversion rate)
   Go to Conversion Rates screen
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-05
         Valid To Date: 2016-12-07
      Save the document
      
      Create a new document
         Currency: EUR
         To Currency: ARS
         Valid From Date: 2016-12-08
         Valid To Date: 2016-12-10
      Try save the document
Notice there's no error and the record has been successfully saved.
(0092239)
hgbot   
2016-12-09 10:49   
Repository: erp/devel/pi
Changeset: d008b46f932c1f562b9d24aa2ede7adbfd8f0ce6
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Dec 05 09:13:06 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/d008b46f932c1f562b9d24aa2ede7adbfd8f0ce6 [^]

Fixes issue 34661: You can set 2 conversion rate in the same period

In conversion rates window, it was possible to define different conversion rates
to the same currency in the same period. When inserting or updating a conversion
rate, the date was validated so no overlaping ocurred, but it was only validating
the cases when dateFrom or dateTo were between the newly created dates, not when
those dates were outside the range of dates, i.e, were overlaping the entire range
of dates already in the system for the given date.

---
M src/org/openbravo/event/ConversionRateEventHandler.java
---
(0092240)
dmiguelez   
2016-12-09 10:49   
Code Review + Testing ok
(0092694)
hudsonbot   
2016-12-16 18:39   
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/dc8bf00badd0 [^]
Maturity status: Test