Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038645Openbravo ERP04. Warehouse managementpublic2018-05-29 10:012018-06-08 12:55
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q3 
dmiguelez
Core
No
0038645: [Reset Unit Cost] Wrong Stock shown in Product - Unit Cost if there exists a transaction cost with a different accounting date
[Reset Unit Cost] Wrong Stock shown in Product - Unit Cost if there exists a transaction cost with a different accounting date
As group admin role:
   Create a new product
   Add a purchase price to it
   Create a Goods Receipt
   Add 100 units of the product
   Complete it
   Schedule the Costing Background process to be run immediately
   Go to Product - Transactions tab and add a Manual Cost Adjustment to the transaction
   Set a different accounting date than the Goods Receipt accounting date
   Launch the Reset Unit Cost process
   Check in Product - Unit Cost tab that Stock shows 200 units
No tags attached.
Issue History
2018-05-29 10:01ngarciaNew Issue
2018-05-29 10:01ngarciaAssigned To => Triage Finance
2018-05-29 10:01ngarciaModules => Core
2018-05-29 10:01ngarciaResolution time => 1529359200
2018-05-29 10:01ngarciaTriggers an Emergency Pack => No
2018-05-29 10:04ngarciaIssue Monitored: networkb
2018-05-29 15:34PracticsIssue Monitored: Practics
2018-05-31 16:33dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-06-06 21:35AtulOpenbravoStatusnew => scheduled
2018-06-08 08:23AtulOpenbravoNote Added: 0105023
2018-06-08 08:52hgbotCheckin
2018-06-08 08:52hgbotNote Added: 0105027
2018-06-08 08:52hgbotStatusscheduled => resolved
2018-06-08 08:52hgbotResolutionopen => fixed
2018-06-08 08:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d0c75cf1e6226cb77706f4032f1f8bc2e1d97323 [^]
2018-06-08 08:53dmiguelezReview Assigned To => dmiguelez
2018-06-08 08:53dmiguelezNote Added: 0105028
2018-06-08 08:53dmiguelezStatusresolved => closed
2018-06-08 08:53dmiguelezFixed in Version => 3.0PR18Q3
2018-06-08 12:55hudsonbotCheckin
2018-06-08 12:55hudsonbotNote Added: 0105037

Notes
(0105023)
AtulOpenbravo   
2018-06-08 08:23   
Test Plan

- Login as F&B International Group admin role:
- Create a new product with name: "Test 38645 product"
- Add a purchase price to it
- Create a Goods Receipt with Today's Date
- Add 100 units of the product
- Complete it
- Schedule the Costing Background process to be run immediately
- Go to Product - Transactions tab and add a Manual Cost Adjustment to the transaction
- Set a different accounting date as (Today's Date + 1), Cost = 1100, process the cost Adjustment.
- Launch the Reset Unit Cost process.
- Check in Product - Unit Cost tab that Stock shows 100 units. This is correct.
(0105027)
hgbot   
2018-06-08 08:52   
Repository: erp/devel/pi
Changeset: d0c75cf1e6226cb77706f4032f1f8bc2e1d97323
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jun 08 09:45:12 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/d0c75cf1e6226cb77706f4032f1f8bc2e1d97323 [^]

Fixes Issue 38645: [Reset Unit Cost] Wrong Stock shown in Product -
Unit Cost if there exists a transaction cost with a different
accounting date

Use LAG function to check whether movementqty for previous
m_transaction_id is already considered so that once it is used
for next records with same m_transaction_id consider it as 0
so that sum(qty) is correct.

---
M src-db/database/model/functions/M_INITIALIZE_STOCK_VALUATION.xml
---
(0105028)
dmiguelez   
2018-06-08 08:53   
Code Review + Testing Ok
(0105037)
hudsonbot   
2018-06-08 12:55   
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/91fd448a9bef [^]
Maturity status: Test