Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042824Openbravo ERP04. Warehouse managementpublic2020-01-13 16:212020-02-03 18:28
jorge_acosta 
AtulOpenbravo 
highmajoralways
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
OBPS
Core
14150
No
0042824: Stock Valuation and Unit Cost of 0 in Product - Unit Cost tab moving the total amount of produt from one bin to another
Possible regression introduced in this commit : https://issues.openbravo.com/view.php?id=37850 [^]

Stock Valuation of 0 in Product - Unit Cost tab, if product is received in a warehouse created after unit cost is calculated and then you move the total amount of produt from one bin to another in the new warehouse with costing rule active in warehouse
Test Plan
  Go to Preference window and create a new record:
    Organization: * , Property: Allow to persist Unit Cost, Value: Y
  Log out and Log in
  Create a new Costing Rule for 'White Valley Spain S.A', select Warehouse Dimension checkbox and Validate it
  Launch Reset Unit Cost for White Valley Spain S.A organization
  Go to Warehouse and Storage Bin and create a new record:
    Organization: White Valley Spain S.A
    Search Key/Name: IssueWarehouse
    Set an Spain location
    Create 2 new records in Storage Bin tab:
      Search Key: testbin1
      Fill all the required fields
      Search Key: testbin2
      Fill all the required fields
  Go to Goods Movements Window and create a new record:
    Organization: White Valley Spain S.A
    Create a new record in Lines tab:
      Product: Digital altimeter Blue
      Movement Quantity: 5
      New Storage Bin: testbin1
    Process the Movement
  Go to Process Reques window and unschedule the Costing Background Process and edit it to Run Inmediately and Reschedule the Process and check ends successfully
Go to Goods Movements Window and create a new record:
    Organization: White Valley Spain S.A
    Create a new record in Lines tab:
      Product: Digital altimeter Blue
      Movement Quantity: 5
      From Storage Bin : testbin1
      New Storage Bin: testbin2
      Process the Movement
      Go to Process Reques window and unschedule the Costing Background Process and edit it to Run Inmediately and Reschedule the Process and check ends successfully
  Go to Product window and select Digital altimeter Blue record:
    Check in Unit Cost a new record was created for IssueWarehouse with:
      Organization: White Valley Spain S.A, Stock: 5, Stock Valuation: 0, Warehouse: Issue Warehouse, Unit Cost: 0
Client suggest that the possible regrssion could have been introduced in this commit : https://issues.openbravo.com/view.php?id=37850 [^]
No tags attached.
png supportimage.png (152,607) 2020-01-13 16:21
https://issues.openbravo.com/file_download.php?file_id=13806&type=bug
png
Issue History
2020-01-13 16:21jorge_acostaNew Issue
2020-01-13 16:21jorge_acostaAssigned To => Triage Finance
2020-01-13 16:21jorge_acostaFile Added: supportimage.png
2020-01-13 16:21jorge_acostaOBNetwork customer => No
2020-01-13 16:21jorge_acostaModules => Core
2020-01-13 16:21jorge_acostaResolution time => 1580684400
2020-01-13 16:21jorge_acostaTriggers an Emergency Pack => No
2020-01-13 16:43jorge_acostaSupport ticket => 14150
2020-01-13 16:43jorge_acostaDescription Updatedbug_revision_view_page.php?rev_id=20091#r20091
2020-01-13 17:19eugeniIssue Monitored: eugeni
2020-01-14 11:50jorge_acostaSummaryStock Valuation of 0 in Product - Unit Cost tab if product is received in a warehouse created after unit cost is calculated => Stock Valuation and Unit Cost of 0 in Product - Unit Cost tab moving the total amount of produt from one bin to another
2020-01-14 11:50jorge_acostaDescription Updatedbug_revision_view_page.php?rev_id=20092#r20092
2020-01-20 13:58jorge_acostaOBNetwork customerNo => OBPS
2020-01-20 15:51dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2020-01-20 18:07AtulOpenbravoStatusnew => scheduled
2020-01-22 19:44AtulOpenbravoNote Added: 0117181
2020-01-22 19:54AtulOpenbravoNote Added: 0117182
2020-01-22 19:56AtulOpenbravoNote Added: 0117183
2020-01-22 19:57AtulOpenbravoNote Added: 0117184
2020-01-23 06:23AtulOpenbravoNote Edited: 0117181bug_revision_view_page.php?bugnote_id=0117181#r20205
2020-01-23 06:34AtulOpenbravoNote Edited: 0117183bug_revision_view_page.php?bugnote_id=0117183#r20207
2020-01-23 10:11AtulOpenbravoNote Edited: 0117181bug_revision_view_page.php?bugnote_id=0117181#r20208
2020-01-30 17:01hgbotCheckin
2020-01-30 17:01hgbotNote Added: 0117373
2020-01-30 17:01hgbotStatusscheduled => resolved
2020-01-30 17:01hgbotResolutionopen => fixed
2020-01-30 17:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cb194cf727520e38703c866a37405819066d66f0 [^]
2020-01-30 17:04dmiguelezReview Assigned To => dmiguelez
2020-01-30 17:04dmiguelezNote Added: 0117374
2020-01-30 17:04dmiguelezStatusresolved => closed
2020-01-30 17:04dmiguelezFixed in Version => 3.0PR20Q2
2020-02-03 18:28eugeniNote Added: 0117436

Notes
(0117181)
AtulOpenbravo   
2020-01-22 19:44   
(edited on: 2020-01-23 10:11)
Test Plan I - 37850

- Go to Preference window and create a new record:
  Organization: F&B US, Inc., Property: Allow to persist Unit Cost, Value: Y
- Log out and Log in
- Create a new Costing Rule for 'F&B US, Inc.', select Warehouse Dimension checkbox and Validate it
- Launch Reset Unit Cost for F&B US, Inc. organization
- Go to Warehouse and Storage Bin and create a new record:
    Organization: F&B US East Coast
    Search Key/Name: TW37850
    Set an Spain location
    Create a new record in Storage Bin tab:
      Search Key: 37850_0
      Fill all the required fields
- Go to Goods Movements Window and create a new record:
    Organization: F&B US East Coast
    Create a new record in Lines tab:
      Product: White wine
      Movement Quantity: 5
      New Storage Bin: 37850_0
- Process the Movement
- Go to Process Reques window and unschedule the Costing Background Process and edit it to Run Inmediately and Reschedule the Process and check ends successfully
- Go to Product window and select White wine record:
- Check in Unit Cost a new record was created for TW37850 Warehouse with:
  Organization: F&B US, Inc., Stock: 5, Stock Valuation: 17.75, Warehouse:TW37850, Unit Cost: 3.55
- Go to Goods Receipts window and create a new record:
    Organization: F&B US East Coast
    Business Partner: Be Soft Drinker, Inc.
    Create a new record in Lines tab:
      Product: White wine
      Storage Bin: 37850_0
      Movement Quantity: 7
- Complete the Receipt
- Launch the Costing Background Process
- Go to White wine product and check the Valuation Stock for TW37850 Warehouse was updated as Organization: F&B US, Inc., Stock: 12, Stock Valuation: 42.6, Warehouse: TW37850, Unit Cost: 3.55


Test Plan II - 37850
- Go to Product window and create a new record:
    Organization: F&B US, Inc.
    Search Key/Name: Issue Product
    Create a new record in Price tab:
      Price List Version: Be Soft Drinker Price List
      Unit Price: 7
    Check 0 Stock Valuation value for the three warehouses
- Go to Goods Receipts window and create a new record:
    Organization: F&B US East Coast
    Business Partner: Be Soft Drinker, Inc.
    Create a new record in Lines tab:
      Product: Issue Product
      Storage Bin: 37850_0
      Movement Quantity: 10
- Complete the Receipt
- Launch the Costing Background Process
- Go to Product window and select Issue Product record and check the Valuation Stock for TW37850 Warehouse was updated as Organization: F&B US, Inc., Stock: 10, Stock Valuation: 70, Warehouse: TW37850 Warehouse, Unit Cost: 7

(0117182)
AtulOpenbravo   
2020-01-22 19:54   
Test Plan - 42824

- Go to Preference window and create a new record:
    Organization: * , Property: Allow to persist Unit Cost, Value: Y
- Log out and Log in

- Create a new Costing Rule for 'F&B US Inc', select Warehouse Dimension checkbox and Validate it

- Launch Reset Unit Cost for F&B US Inc organization

- Go to Warehouse and Storage Bin and create a new record:
    - Organization: for F&B US Inc
    - Search Key/Name: TW42824
        Set an Spain location
    - Create 2 new records in Storage Bin tab:
      -Search Key: 42824_0
        Fill all the required fields
      -Search Key: 42824_1
        Fill all the required fields

- Go to Goods Movements Window and create a new record:
    Organization: F&B US Inc
    Create a new record in Lines tab:
      Product: Ale Beer
      Movement Quantity: 5
      New Storage Bin: 42824_0
- Process the Movement

- Go to Process Reques window and unschedule the Costing Background Process and edit it to Run Inmediately and Reschedule the Process and check ends successfully

- Go to Product window and select Ale Beer record:
- Check in Unit Cost a new record was created for TW42824 with Organization: F&B US Inc, Stock: 5, Stock Valuation: 6.80, Warehouse: TW42824, Unit Cost: 1.36

- Launch Reset Unit Cost for F&B US Inc organization

- Go to Product window and select Ale Beer record:
- Check in Unit Cost a new record was created for TW42824 with Organization: F&B US Inc, Stock: 5, Stock Valuation: 6.80, Warehouse: TW42824, Unit Cost: 1.36

- Go to Goods Movements Window and create a new record:
    Organization: F&B US Inc
    Create a new record in Lines tab:
      Product: Ale Beer
      Movement Quantity: 5
      From Storage Bin : 42824_0
      New Storage Bin: 42824_1
- Process the Movement

- Go to Process Request window and unschedule the Costing Background Process and edit it to Run Inmediately and Reschedule the Process and check ends successfully

- Go to Product window and select Ale Beer record:
- Check in Unit Cost a new record was created for TW42824 with Organization: F&B US Inc, Stock: 5, Stock Valuation: 6.80, Warehouse: TW42824, Unit Cost: 1.36

- Launch Reset Unit Cost for F&B US Inc organization

- Go to Product window and select Ale Beer record:
- Check in Unit Cost a new record was created for TW42824 with Organization: F&B US Inc, Stock: 5, Stock Valuation: 6.80, Warehouse: TW42824, Unit Cost: 1.36
(0117183)
AtulOpenbravo   
2020-01-22 19:56   
(edited on: 2020-01-23 06:34)
Test Plan 34068

- Login as system admin role:
- Set Cost Precision of the currency (i.e EUR) to 6

- Login as F&B International group admin role:
- Set the following two preferences as Y:
      Allow to persist Unit Cost
      Enable Negative Stock Corrections
   
- Create a new product
- Create a physical inventory and add the previously created product:
      Quantity count: 19
      Cost: 26.24069

- Create two Goods Shipments: one of 10 units and one of 9 units
- Launch the Costing Background Process
   
- Check the Stock Valuation is 0.00 in Product - Unit Cost tab. It is correct
- Launch the Reset Unit Cost process and check the stock valuation remains 0

(0117184)
AtulOpenbravo   
2020-01-22 19:57   
Test Plan 34055

As system admin role:
   Set Cost Precision of the currency to 6
As group admin role:
   1. Set the following two preferences as Y:
      Allow to persist Unit Cost
      Enable Negative Stock Corrections
   2. Create a new product
   3. Create a physical inventory and add the previously created product:
      Quantity count: 19
      Cost: 26.24
   4. Launch the Costing Background Process
      Check the Stock is 19 and Stock Valuation is 498.57 in Product - Unit Cost tab
   5. Launch the Reset Unit Cost process and check values remain the same
   6. Create two Goods Shipments: one of 10 units and one of 9 units
   7. Launch the Costing Background Process
   8. Check the Stock is 0.00 and Stock Valuation is 0.00 in Product - Unit Cost tab
   9. Launch the Reset Unit Cost process and check values remain the same
   10. Create a new physical inventory:
      Quantity count: 19
      Cost: null
   11.Launch the Costing Background Process
      Check the Stock is 19 and Stock Valuation is 498.56
   12. Launch the Reset Unit Cost process and check the Stock is 19 and Stock Valuation is 498.56
(0117373)
hgbot   
2020-01-30 17:01   
Repository: erp/devel/pi
Changeset: cb194cf727520e38703c866a37405819066d66f0
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jan 24 12:20:53 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/cb194cf727520e38703c866a37405819066d66f0 [^]

Fixes BUG-0042824: Stock Valuation and Unit Cost of 0 in
Product - Unit Cost tab moving the total amount of produt
from one bin to another

When stock quantity is being updated as ZERO in the
m_stock_valuation then valuation also should be set
as ZERO.

---
M src-db/database/model/functions/M_UPDATE_STOCK_VALUATION.xml
---
(0117374)
dmiguelez   
2020-01-30 17:04   
Code Review + Testing Ok
(0117436)
eugeni   
2020-02-03 18:28   
Fix does not pass test plan https://issues.openbravo.com/view.php?id=42824#c117182 [^] (at least in current CS 19Q3.3)