Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039036Openbravo ERP04. Warehouse managementpublic2018-07-24 18:192018-08-09 17:22
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q4 
Sandrahuguet
Core
No
0039036: Wrong Current Unit Cost for production products in Inventory Amount Update Lines
Wrong Current Unit Cost for production products in Inventory Amount Update Lines
As group admin role:
   Create a new Costing Rule
   Set it with warehouse dimension
   Validate it
   Create a new product
   Set it as production
   Add a purchase price list to it
   Create two purchase orders, one for Region Norte and one for Region Sur
   Add the previously created product in both of them but with different price
   Create the related goods receipts

   Launch the Costing Background Process

   Create a Inventory Amount Update
   Add the previously created product
   Leave the warehouse empty and check Current Inventory Amount and On hand qty shows the whole stock and cost valuation. This is correct
   Set a warehouse and check the current inventory amount remains the same but on hand qty shows only the amount on that warehouse. Thus, Current Unit Cost is wrong
No tags attached.
Issue History
2018-07-24 18:19ngarciaNew Issue
2018-07-24 18:19ngarciaAssigned To => Triage Finance
2018-07-24 18:19ngarciaModules => Core
2018-07-24 18:19ngarciaResolution time => 1534197600
2018-07-24 18:19ngarciaTriggers an Emergency Pack => No
2018-07-24 18:20ngarciaIssue Monitored: networkb
2018-07-27 17:08markmm82Assigned ToTriage Finance => markmm82
2018-07-27 17:08markmm82Statusnew => acknowledged
2018-07-30 17:43ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17474#r17474
2018-08-08 19:19markmm82Note Added: 0106246
2018-08-08 19:27markmm82Statusacknowledged => scheduled
2018-08-09 13:14hgbotCheckin
2018-08-09 13:14hgbotNote Added: 0106251
2018-08-09 13:14hgbotStatusscheduled => resolved
2018-08-09 13:14hgbotResolutionopen => fixed
2018-08-09 13:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e0772da8f954ef42e1d809138c74dd5354d4fa1b [^]
2018-08-09 13:16SandrahuguetReview Assigned To => Sandrahuguet
2018-08-09 13:16SandrahuguetNote Added: 0106252
2018-08-09 13:16SandrahuguetStatusresolved => closed
2018-08-09 13:16SandrahuguetFixed in Version => 3.0PR18Q4
2018-08-09 17:22hudsonbotCheckin
2018-08-09 17:22hudsonbotNote Added: 0106268

Notes
(0106246)
markmm82   
2018-08-08 19:19   
Test Plan:
As group admin role:
   Create a new Costing Rule
   Set it with warehouse dimension
   Validate it
   Create a new product
   Set it as production
   Add a purchase price list to it
   Create two purchase orders, one for Region Norte and one for Region Sur
   Add the previously created product in both of them but with different price
   Create the related goods receipts

   Launch the Costing Background Process

   Create a Inventory Amount Update
   Add the previously created product
   Notice the warehouse field is hidden and check Current Inventory Amount and On hand qty shows the whole stock and cost valuation. This is correct.

   Now, change the product and select aproduct that isn't a production product.
   Notice the warehouse field is shown with the default warehouse and check Current Inventory Amount and On hand qty shows the whole stock and cost valuation. This is correct.
(0106251)
hgbot   
2018-08-09 13:14   
Repository: erp/devel/pi
Changeset: e0772da8f954ef42e1d809138c74dd5354d4fa1b
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Aug 08 13:12:19 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/e0772da8f954ef42e1d809138c74dd5354d4fa1b [^]

Fixes issue 39036: Wrong Current Unit Cost for production products
in Inventory Amount Update Lines

To avoid confusion to users if the selected product is marked as production then
the warehouse dimension will be hidden as this dimension is not taken into account
in the process when the Current Inventory Amount and On hand qty values are calculated
for production products.

This solution includes:
- Created a new auxiliary input related to the Inventory Amount Update Lines tab to store
  the value if the selected product is a production product or not.
- Was modified the Display Logic of the Warehouse field to take into account if the selected
  product is a production product or not. In case it is the field is hidden, in other case it is shown.
- Was modified the SL_InvAmtUpd_ProductRefDate.java callout to set an empy warehouse
  when the product is marked as production.

---
M src-db/database/sourcedata/AD_AUXILIARINPUT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_ProductRefDate.java
---
(0106252)
Sandrahuguet   
2018-08-09 13:16   
Code review + testing OK
(0106268)
hudsonbot   
2018-08-09 17:22   
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/eed070ea968c [^]
Maturity status: Test