Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038240Openbravo ERP04. Warehouse managementpublic2018-03-28 08:142018-05-09 19:29
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q3 
dmiguelez
Core
No
0038240: Wrong average cost for production products, Total Movement Quantity is not correct
Wrong average cost for production products, Total Movement Quantity is not correct
As group admin role:
   Unschedule Costing Background Process
   Create a new product in 'F&B International Group'
   Set it as Production
   Add the following prices:
      Be Soft Drinker Price List: 4.06
      Tarifa Bebidas Alegres: 0
      General Sales: 6
   Create a purchase order for 'F&B US East Coast', add 12 units of the product and book it
   Create the related Goods Receipt
   Create a purchase order for 'F&B US East Coast', add 8 units of the product and book it
   Create the related Goods Receipt
   Create a Goods shipment for 'F&B US East Coast', add 10 units of the product and complete it
   Create a purchase order for 'F&B España - Región Norte', add 10 units of the product and book it
   Create the related Goods Receipt

   Schedule the Costing Bacground Process to be run immediately

   Check the latest average cost for the product is 2.71 and it should be 2.03
   Total Movement Quantity is 30 and it should be 20 and Total Stock Valuation is 81.20 and it should be 40.60
No tags attached.
Issue History
2018-03-28 08:14ngarciaNew Issue
2018-03-28 08:14ngarciaAssigned To => Triage Finance
2018-03-28 08:14ngarciaModules => Core
2018-03-28 08:14ngarciaResolution time => 1524002400
2018-03-28 08:14ngarciaTriggers an Emergency Pack => No
2018-03-28 08:14ngarciaIssue Monitored: networkb
2018-04-03 16:08dmiguelezAssigned ToTriage Finance => collazoandy4
2018-04-05 22:47collazoandy4Statusnew => scheduled
2018-04-16 22:25collazoandy4Note Added: 0103919
2018-04-18 16:35hgbotCheckin
2018-04-18 16:35hgbotNote Added: 0103974
2018-04-18 16:35hgbotStatusscheduled => resolved
2018-04-18 16:35hgbotResolutionopen => fixed
2018-04-18 16:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fa5700b5eeb2c9fb774938ac813763c39dd1c2b1 [^]
2018-04-18 16:36dmiguelezReview Assigned To => dmiguelez
2018-04-18 16:36dmiguelezNote Added: 0103975
2018-04-18 16:36dmiguelezStatusresolved => closed
2018-04-18 16:36dmiguelezFixed in Version => 3.0PR18Q3
2018-05-09 19:29hudsonbotCheckin
2018-05-09 19:29hudsonbotNote Added: 0104390

Notes
(0103919)
collazoandy4   
2018-04-16 22:25   
Test Plan
  As group admin role:
   Unschedule Costing Background Process
   Go to Product window and create a new record:
     Search Key/Name: 38240
     Production: Y
     Create three new records in Price tab:
       Be Soft Drinker Price List: 4.06
       Tarifa Bebidas Alegres: 0
       General Sales: 6
   Create a purchase order for 'F&B US East Coast', add 12 units of the product and book it
   Create the related Goods Receipt
   Create a purchase order for 'F&B US East Coast', add 8 units of the product and book it
   Create the related Goods Receipt
   Create a Goods shipment for 'F&B US East Coast', add 10 units of the product and complete it
   Create a purchase order for 'F&B España - Región Norte', add 10 units of the product and book it
   Create the related Goods Receipt
   Go to Process Request window and schedule the Costing Bacground Process to be run immediately
   Go to Product Costing tab and check:
     The latest average cost is 2.03
     Total Movement Quantity is 20
     Total Stock Valuation is 40.60
(0103974)
hgbot   
2018-04-18 16:35   
Repository: erp/devel/pi
Changeset: fa5700b5eeb2c9fb774938ac813763c39dd1c2b1
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon Apr 16 15:59:24 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/fa5700b5eeb2c9fb774938ac813763c39dd1c2b1 [^]

Fixes issue 38240: Wrong average cost for production products, Total Movement
Quantity is not correct

Wrong average cost for production products, Total Movement Quantity and Total Stock
Valuation is not correct because the cost for production is calculated at client level
and the stock and stock valuation was filtering by Legal Entity.

Now the stock and stock valuation is filtered by client level for production products

---
M src/org/openbravo/costing/CostingUtils.java
---
(0103975)
dmiguelez   
2018-04-18 16:36   
Code Review + Testing Ok
(0104390)
hudsonbot   
2018-05-09 19:29   
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/2be7d3efe606 [^]
Maturity status: Test