Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040623Openbravo ERP04. Warehouse managementpublic2019-04-16 10:362019-05-21 15:16
gorkaion 
nonofrancisco 
highmajoralways
closedfixed 
5
 
3.0PR19Q3 
dmiguelez
Core
No
0040623: Valued Stock Report with aggregated data not working when filtering by old data
When filtering the Valued Stock Report by a date that has newer aggregated data the transactions from last valid aggregated data to filter date are not considered.
On a environment with aggregated data enabled.
For a product there is aggregated data for:

01-01-2019 to 31-01-2019
01-02-2019 to 28-02-2019
01-02-2019 to 31-03-2019

If you filter the Valued Stock Report for 10-02-2019 the stock is wrong. It will not consider transactions happened from 01-02-2019 to 10-02-2019.
On ValuedStockReport.java when calculating the strMaxAggDate variable it should execute the selectMaxAggregatedDate query including the date used in the filter so the returned value is always before that date. In the example it is returning 31-03-2019 so the report is using the aggregated data until 31-01-2019 and the transactions from 31-03-2019 to 10-02-2019 which is wrong.
No tags attached.
related to defect 0040670 closed Sandrahuguet Generate Aggregated Data Background process fail 
related to defect 0040676 closed dmiguelez Valued Stock Report not properly working when movementDate has more precision than days and aggregated data 
Issue History
2019-04-16 10:36gorkaionNew Issue
2019-04-16 10:36gorkaionAssigned To => Triage Finance
2019-04-16 10:36gorkaionModules => Core
2019-04-16 10:36gorkaionResolution time => 1557180000
2019-04-16 10:36gorkaionTriggers an Emergency Pack => No
2019-04-16 17:42SandrahuguetAssigned ToTriage Finance => nonofrancisco
2019-04-24 12:53SandrahuguetNote Added: 0111272
2019-04-24 13:06SandrahuguetRelationship addedrelated to 0040670
2019-04-24 15:24hgbotCheckin
2019-04-24 15:24hgbotNote Added: 0111282
2019-04-24 15:24hgbotStatusnew => resolved
2019-04-24 15:24hgbotResolutionopen => fixed
2019-04-24 15:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1fbbfb4e42f7644f9b1c229af765936dadf0df3d [^]
2019-04-24 15:25SandrahuguetReview Assigned To => Sandrahuguet
2019-04-24 15:25SandrahuguetNote Added: 0111283
2019-04-24 15:25SandrahuguetStatusresolved => closed
2019-04-24 15:25SandrahuguetFixed in Version => 3.0PR19Q3
2019-04-25 09:07SandrahuguetStatusclosed => new
2019-04-25 09:07SandrahuguetResolutionfixed => open
2019-04-25 09:07SandrahuguetFixed in Version3.0PR19Q3 =>
2019-04-26 09:07hgbotCheckin
2019-04-26 09:07hgbotNote Added: 0111343
2019-04-26 09:08dmiguelezStatusnew => scheduled
2019-04-26 09:08dmiguelezStatusscheduled => resolved
2019-04-26 09:08dmiguelezFixed in Version => 3.0PR19Q3
2019-04-26 09:08dmiguelezResolutionopen => fixed
2019-04-26 09:08dmiguelezReview Assigned ToSandrahuguet => dmiguelez
2019-04-26 09:08dmiguelezNote Added: 0111345
2019-04-26 09:08dmiguelezStatusresolved => closed
2019-04-26 10:15dmiguelezRelationship addedrelated to 0040676
2019-05-21 15:16hudsonbotCheckin
2019-05-21 15:16hudsonbotNote Added: 0111996
2019-05-21 15:16hudsonbotCheckin
2019-05-21 15:16hudsonbotNote Added: 0111999

Notes
(0111272)
Sandrahuguet   
2019-04-24 12:53   
Test Plan:
Go to open/close period control and close 2014 and 2015 from F&B España
Go to End year close and close 2014 and 2015 from F&B España
Go to Valued Stock report and filter by:
 Organization: F&B España, S.A
 Date 27-11-2015
 Consolidated warehouse: true
Save the results
Go to Process request and run Generate Aggregated Data Background
Go to Valued Stock report and filter by:
 Organization: F&B España, S.A
 Date 27-11-2015
 Consolidated warehouse: true
compare both results and notice that are the same
(0111282)
hgbot   
2019-04-24 15:24   
Repository: erp/devel/pi
Changeset: 1fbbfb4e42f7644f9b1c229af765936dadf0df3d
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Wed Apr 24 13:21:07 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1fbbfb4e42f7644f9b1c229af765936dadf0df3d [^]

Fixes issue 40623: Considers date in filter

When retrieving the date for aggregate report, date set in filter is also
considered.

---
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock_data.xsql
---
(0111283)
Sandrahuguet   
2019-04-24 15:25   
Code review + testing OK
(0111343)
hgbot   
2019-04-26 09:07   
Repository: erp/devel/pi
Changeset: d1c1ca14caff16f0f6b4f0bc2761878675f65163
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Apr 25 09:53:25 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d1c1ca14caff16f0f6b4f0bc2761878675f65163 [^]

Related to Issue 40623. Use proper date to filter the max aggregated period

---
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
---
(0111345)
dmiguelez   
2019-04-26 09:08   
Code Review + Testing Ok
(0111996)
hudsonbot   
2019-05-21 15:16   
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/9b8f37d9d85e [^]
Maturity status: Test
(0111999)
hudsonbot   
2019-05-21 15:16   
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/9b8f37d9d85e [^]
Maturity status: Test