Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027853Openbravo ERP04. Warehouse managementpublic2014-10-13 15:142014-12-30 23:23
psanjuan 
umartirena 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
pi 
Core
No
0027853: Manual Cost Correction Cost adjustments are not properly created.
"Manual Cost Correction" Cost adjustments are not properly created.
Create a new product named "Costing H1" in QA Testing client, Spain org.
Go to Price tab and enter a unit/list price of 105

Go to purchase order and create a new one dated on 28/10/2014 for 100 unit. Book the order.

Create a new order dated on 29/10/2014 for 100 unit, this time change the price to 105.50. Book the order.

Go to goods receipt window and create a new one dated on 30/10/2014. Create lines from two orders which means to receipt 200 units of the product. Complete the receipt. Navigate to Process Request window and launch costing background process.

Go back to goods receipt and post the receipt dated on 30/10/2014. Posting will show a value of 21050.

Go to product window, search the product and go to costing tab. Realize that there are two lines:
line 1 showing a cost of 105 and a total movement qty of 100
line 2 showing a cost of 105.25 (10500+10550/200) and a total movement qty of 200

Go to purchase invoice, create a new one dated on 1/11/2014. Create lines from the receipt. Complete and Post the invoice.

Go to Goods shipment window and create a new one for the product dated on 10/11/2014. Ship 150 units.

Navigate to Process Request window and launch costing background process.

Go back to goods shipment window and post shipment dated on 10/11/2014.. Posting will show a value of 15787.50

Go to product window, search the product and navigate to transactions tab. Search receipt dated on 30/10/2014 and valued at 10550 and press the button "Manual Cost Adjustment". Enter a total cost of 10600 and a date of 02/11/2014. Press OK.

Realize that total cost and unit cost of this transaction has changed to 10600.

Go to costing tab and realize that there is new cost of 105.33, but this is not correct as it should be: 10500+10600/200 = 105.50

Go to Cost Adjustment window and realize that a new "Manual Cost Correction" cost adjustment has been created, including below two lines:

line 1 adjust receipt dated on 29/10/2014. Adjustment amount is 50 (10600-10550), this is correct.

line 2 adjust shipment dated on 10/11/2014. Adjustment amount is 12. This is not correct as it should be 37.50 (150 units *105.50 new cost -15787.50)

Go to costing tab and realize that there is new cost of 105.33, but this is not correct as it should be: 10500+10600/200 = 105.50

Go to Cost Adjustment window and realize that a new "Manual Cost Correction" cost adjustment has been created, including below two lines:

line 1 adjust receipt dated on 29/10/2014. Adjustment amount is 50 (10600-10550), this is correct.

line 2 adjust shipment dated on 10/11/2014. Adjustment amount is 12. This is not correct as it should be 37.50 (150 units *105.50 new cost -15787.50)
No tags attached.
Issue History
2014-10-13 15:14psanjuanNew Issue
2014-10-13 15:14psanjuanAssigned To => dmiguelez
2014-10-13 15:14psanjuanModules => Core
2014-10-13 15:14psanjuanTriggers an Emergency Pack => No
2014-10-16 09:55psanjuanAssigned Todmiguelez => umartirena
2014-10-16 09:55psanjuanDescription Updatedbug_revision_view_page.php?rev_id=6797#r6797
2014-10-16 09:55psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6799#r6799
2014-10-16 09:55psanjuanProposed Solution updated
2014-10-21 13:56hgbotCheckin
2014-10-21 13:56hgbotNote Added: 0071089
2014-10-21 13:56hgbotStatusnew => resolved
2014-10-21 13:56hgbotResolutionopen => fixed
2014-10-21 13:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2c476c2bc32821131d9a6f8878db795bee3ce330 [^]
2014-10-21 14:57psanjuanNote Added: 0071091
2014-10-21 14:57psanjuanStatusresolved => closed
2014-10-23 16:52umartirenaNote Added: 0071137
2014-10-23 16:52umartirenaStatusclosed => new
2014-10-23 16:52umartirenaResolutionfixed => open
2014-10-23 16:58hgbotCheckin
2014-10-23 16:58hgbotNote Added: 0071138
2014-10-28 13:43umartirenaStatusnew => scheduled
2014-10-28 13:44umartirenaStatusscheduled => resolved
2014-10-28 13:44umartirenaFixed in Version => pi
2014-10-28 13:44umartirenaFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/2c476c2bc32821131d9a6f8878db795bee3ce330 [^] => https://code.openbravo.com/erp/devel/pi/rev/eb511c7f7b05 [^]
2014-10-28 13:44umartirenaResolutionopen => fixed
2014-10-28 15:01psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6905#r6905
2014-10-28 15:02psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6906#r6906
2014-10-28 15:06psanjuanNote Added: 0071226
2014-10-28 15:06psanjuanStatusresolved => closed
2014-12-30 23:23hudsonbotCheckin
2014-12-30 23:23hudsonbotNote Added: 0072961
2014-12-30 23:23hudsonbotCheckin
2014-12-30 23:23hudsonbotNote Added: 0072977

Notes
(0071089)
hgbot   
2014-10-21 13:56   
Repository: erp/devel/pi
Changeset: 2c476c2bc32821131d9a6f8878db795bee3ce330
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Oct 21 13:55:05 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2c476c2bc32821131d9a6f8878db795bee3ce330 [^]

Fixes issue 27853: Manual Cost Correction Cost adjustments are not properly created

---
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingBackground.java
---
(0071091)
psanjuan   
2014-10-21 14:57   
Verify.

See https://docs.google.com/a/openbravo.com/spreadsheets/d/1Ilm1oct0vH4iKFlI1I0VbmYM-r8fdo1moK02jd2Zigg/edit#gid=1025660841 [^]

product "Costing H1"
(0071137)
umartirena   
2014-10-23 16:52   
Reopened due to an extra record in Costing tab is created that is not necessary.
(0071138)
hgbot   
2014-10-23 16:58   
Repository: erp/devel/pi
Changeset: eb511c7f7b05c667f765bfa212515f327161f3aa
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Oct 23 16:57:58 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eb511c7f7b05c667f765bfa212515f327161f3aa [^]

Related to Issue 27853: Not any more wrong records created in Costing tab

Changed the filter by Id in CostAdjustmentUtils.getStockOnTransactionDate(), CostAdjustmentUtils.getValuedStockOnTransactionDate() and AverageCostAdjustment.getRelatedTransactions().

---
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
(0071226)
psanjuan   
2014-10-28 15:06   
Verified that no extra record is created in Costing tab but below two lines:
Line 1 - Cost 105 total movement quantity 100
Line 2 - Cost 105.5 total movement quantity 200
(0072961)
hudsonbot   
2014-12-30 23:23   
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
(0072977)
hudsonbot   
2014-12-30 23:23   
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