Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028019Openbravo ERP04. Warehouse managementpublic2014-10-29 20:312014-12-30 23:24
aferraz 
umartirena 
highmajoralways
closedfixed 
30Professional Appliance
 
 
Core
No
0028019: New lines created in costing tab which should not be there
New lines created in costing tab which should not be there
In "QA Testing" client:

Navigate to Warehouse and Storage Bin and create a new warehouse for Spain organization, with name "Spain West warehouse" and Search Key "spainWWH". Navigate to Storage Bin tab and create a new storage bin with name "M01", row M, stack 0, level 1 and priority 50.

Navigate to Organization window, select Spain organization and go to Warehouse tab. Create a new record with warehouse Spain West warehouse and priority 20.

Create a new Product named "Costing GM1" for Spain organization.
Go to Price tab, select "Purchase" price list and enter a unit/list price of 11 €.

Go to Purchase Order window and create a new order for Spain organization, product "Costing GM1", order date 29-10-2014, quantity 820 and price 11.
Book the order. Let's say this is order 801370.

Go to Goods Receipt window and create a new receipt dated on 03-11-2014. Click on Create Lines From, select order 801370, select storage bin L01 and enter 820 units. Complete. Let's say this is receipt 10001795.

Navigate to Process Request window and run "Costing Background process".

Go to receipt window and post the receipt 10001795.
Realize that the value posted to the ledger is 9,020.00 (820 units * 11 €/unit)

Go to Goods Movements window and create a new movement dated on 13-11-2014, name "Costing GM1 - 13-11-2014", product Costing GM1, quantity 400, storage bin L01 (Spain warehouse) and new storage bin M01 (Spain West warehouse). Click on Process Movements. Let's say this is movement 10000059.

Navigate to Process Request window and run "Costing Background process".

Go to movement window and post the movement 10000059.
Realize that the value posted to the ledger is 4,400.00 (400 units * 11 €/unit)

Navigate to product window, select product Costing GM1 and go to Transactions tab. Select the second record (Movement From). Click on Manual Cost Adjustment, select date 18-11-2014, total cost amount 4,000.00 and incremental false.

Go to Purchase Invoice window and create a new invoice for Spain organization, invoice date 08-11-2014. Click on Create Lines From, select receipt 10001795 and change the unit price to 15. Complete the invoice and post it. Let's say this is invoice 10000925.
Realize that the value posted to the ledger is 12,300.00 (820 units * 15 €/unit)

Navigate to Process Request window and run "Price Correction Background".

Navigate to Product window, select Costing GM1 and go to Costing tab, realize that there are 4 records:

- Costing 1: Cost 15 - Transaction Receipt 10001795 - Quantity 820 - Warehouse Spain warehouse

- Costing 2: Cost 10 - Transaction Movement 10000059 - Quantity 400 - Warehouse Spain West warehouse

- Costing 3: Cost 11.95 - Transaction null - Quantity null - Warehouse Spain warehouse

- Costing 4: Cost 15 - Transaction null - Quantity null - Warehouse Spain warehouse

This is not correct, correct should be:


- Costing 1: Cost 15 - Transaction Receipt 10001795 - Quantity 820 - Warehouse Spain warehouse

- Costing 2: Cost 10 - Transaction Movement 10000059 - Quantity 400 - Warehouse Spain West warehouse

- Costing 3: Cost 11.95 - Transaction null - Quantity null - Warehouse Spain warehouse

- Costing 4: Cost 19.76 - Transaction null - Quantity null - Warehouse Spain warehouse

See above

See also: https://issues.openbravo.com/view.php?id=27884 [^]
No tags attached.
Issue History
2014-10-29 20:31aferrazNew Issue
2014-10-29 20:31aferrazAssigned To => umartirena
2014-10-29 20:31aferrazModules => Core
2014-10-29 20:31aferrazTriggers an Emergency Pack => No
2014-10-30 09:14aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6918#r6918
2014-10-30 17:50aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6923#r6923
2014-11-04 10:54hgbotCheckin
2014-11-04 10:54hgbotNote Added: 0071393
2014-11-04 10:54hgbotStatusnew => resolved
2014-11-04 10:54hgbotResolutionopen => fixed
2014-11-04 10:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f679bcf20802033600bfeffadcbc5ca5e6d00b22 [^]
2014-11-06 11:32psanjuanStatusresolved => closed
2014-11-06 11:32psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6971#r6971
2014-11-06 11:35psanjuanNote Added: 0071454
2014-11-06 13:54psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6976#r6976
2014-11-07 13:36hgbotCheckin
2014-11-07 13:36hgbotNote Added: 0071500
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073014
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073030

Notes
(0071393)
hgbot   
2014-11-04 10:54   
Repository: erp/devel/pi
Changeset: f679bcf20802033600bfeffadcbc5ca5e6d00b22
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Nov 04 10:20:30 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f679bcf20802033600bfeffadcbc5ca5e6d00b22 [^]

Fixes issue 28019: Recalculate the cost at the end of averageCostAdjustment

The extra lines in Costing tab in this case are correct, because there is an out transaction (movement from), and these transactions they dont modify the average cost.
Also, at the end of the Average Cost Adjustment the last cost has to be recalculated in order to prevent more out transactions with bad cost until another in transaction happens that recalculates the cost.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0071454)
psanjuan   
2014-11-06 11:35   
Verified for:
Incremental = NO
Increment = Yes & Unit Cost = NO
Incremental = Yes & Unit Cost =Yes

See excel sheet below, item "Costing GM1"
https://docs.google.com/a/openbravo.com/spreadsheets/d/1Ilm1oct0vH4iKFlI1I0VbmYM-r8fdo1moK02jd2Zigg/edit#gid=1046089920 [^]
(0071500)
hgbot   
2014-11-07 13:36   
Repository: erp/devel/pi
Changeset: 90b35b04c6afabfba28c6a03d5a95c1f2341c3ba
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Fri Nov 07 13:36:16 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/90b35b04c6afabfba28c6a03d5a95c1f2341c3ba [^]

Fixes Issue 28114: Remove cost re-calculation related to output transactions

The cost recalculation related to adjustments on output transactions has been removed because it was causing amounts rounding issues and because of this extra records in Costing tab were being created. This recalculation was being doing because of reported issue 28019.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0073014)
hudsonbot   
2014-12-30 23:24   
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/6525fe229e06 [^]
Maturity status: Test
(0073030)
hudsonbot   
2014-12-30 23:24   
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/6525fe229e06 [^]
Maturity status: Test