Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042520Openbravo ERP04. Warehouse managementpublic2019-12-11 16:092020-01-03 12:18
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR20Q2 
aferraz
Core
No
0042520: Pareto Product Report shows wrong stock
Pareto Product Report shows wrong stock
As group admin role:
   Launch the Pareto Product Report
   Select one of the product shown
   Check the stock shown for it
   Go to Product - Transactions tab and do a manual cost adjustment to the last transaction with an accounting date different from the transaction accounting date
   Launch the Pareto Product Report again and check the stock shown is different
No tags attached.
Issue History
2019-12-11 16:09ngarciaNew Issue
2019-12-11 16:09ngarciaAssigned To => Triage Finance
2019-12-11 16:09ngarciaModules => Core
2019-12-11 16:09ngarciaResolution time => 1577919600
2019-12-11 16:09ngarciaTriggers an Emergency Pack => No
2019-12-11 16:10ngarciaIssue Monitored: networkb
2019-12-11 16:10ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19883#r19883
2019-12-12 08:37dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2019-12-30 03:38AtulOpenbravoStatusnew => scheduled
2019-12-30 03:38AtulOpenbravoNote Added: 0116566
2019-12-30 04:17AtulOpenbravoNote Added: 0116567
2020-01-03 12:17hgbotCheckin
2020-01-03 12:17hgbotNote Added: 0116624
2020-01-03 12:17hgbotStatusscheduled => resolved
2020-01-03 12:17hgbotResolutionopen => fixed
2020-01-03 12:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8543baf5758bb1b2629029031df707d45d09a29d [^]
2020-01-03 12:17hgbotCheckin
2020-01-03 12:17hgbotNote Added: 0116625
2020-01-03 12:18aferrazReview Assigned To => aferraz
2020-01-03 12:18aferrazNote Added: 0116626
2020-01-03 12:18aferrazStatusresolved => closed
2020-01-03 12:18aferrazFixed in Version => 3.0PR20Q2

Notes
(0116566)
AtulOpenbravo   
2019-12-30 03:38   
Test Plan
- Login as F&B International Group admin role
- Create a new Warehouse under organization F&B Espana
- Create a Bin under the new Warehouse
- Create a new Product product in Org F&B Espana, Stocked = true
- Create a Physical Inventory Transaction with new Warehouse and Movement Date = (Today's Date -1)
- In line select new Product, select new Bin, set Cost = 10, Quantity = 100
- Process Physical Inventory Transaction.
- Schedule Costing background Process.
- Check Valued stock Report for Organization F&B Espana and new Warehouse
- Realize that Quantity for product is 100 with unit cost 10, valuation 1000.
- Navigate to Pareto Product Report
- Run it for Org: F&B Espana and new Warehouse
- Realize that Quantity for product is 100 with cost 10 and value 1000.
- Navigate to new Product created transaction tab, select the physica inventory transaction record and click Manual Cost Adjustment
- Set Cost 1200 and Accounting Date = Today's date (Note that Physical Inventory was created with date Today's Date -1)
- Click on Done button.
- Schedule Costing Background Process
- Check Valued stock Report for Organization F&B Espana and new Warehouse
- Realize that Quantity for product is 100 with unit cost 12 and valuation 1200.
- Navigate to Pareto Product Report
- Run it for Org: F&B Espana and new Warehouse
- Realize that Quantity for product is 100 with unit cost 12 and value 1200.

(Earlier Quantity was shown as 200 with cost 6 and value 1200.)
(0116567)
AtulOpenbravo   
2019-12-30 04:17   
Note: User may get Conversion not found error while executing Pareto Product Report, so make sure that Background process Generate Aggregated Data Background is executed.
(0116624)
hgbot   
2020-01-03 12:17   
Repository: erp/devel/pi
Changeset: 8543baf5758bb1b2629029031df707d45d09a29d
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Dec 30 08:43:55 2019 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/8543baf5758bb1b2629029031df707d45d09a29d [^]

Fixes BUG-42520:Pareto Product Report shows wrong stock

** Stock quantity was added as many times the no of records
in m_transaction_cost related to m_transaction, to fix
issue m_transaction_cost is removed as main table in select
query, m_transaction is used as main table in the select
query, a subquery is used to calculate sum of the cost from
m_transaction_cost taking into consideration currency conv
if required, then this subquery is join with m_transaction
main table in the query. While re-arranging the queries,
maxaggDate parameter order is changed as required.

---
M src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java
M src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct_data.xsql
---
(0116625)
hgbot   
2020-01-03 12:17   
Repository: erp/devel/pi
Changeset: aa2ffe1a735777ac6a2f79c986390c1bdd33a01b
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Jan 03 12:04:27 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/aa2ffe1a735777ac6a2f79c986390c1bdd33a01b [^]

Related to BUG-42520: Update license year

---
M src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java
M src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct_data.xsql
---
(0116626)
aferraz   
2020-01-03 12:18   
Code review OK