Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028114Openbravo ERP04. Warehouse managementpublic2014-11-06 18:092014-12-30 23:24
psanjuan 
umartirena 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
 
Core
No
0028114: [Costing] Remove cost re-calculation related to output transactions such as shipments.
[Costing] Remove cost re-calculation related to output transactions such as shipments.
In QA testing client go to Product window.
Create a new product named Costing V11. Select a purchase price list and enter a unit/list price of 20.00

Go to purchase order window and create a new one dated on 6/11/2014. Enter product Costing V11. Enter 100 units. Net Unit Price 20.00. Book the order.

Go to purchase order window and create a new one dated on 15/11/2014. Enter product Costing V11. Enter 200 units. Change Net Unit Price to 15.00. Book the order.

Go to Goods Receipt window and create a new one dated on 20/11/2014. Select two orders created above by using process button "Create Lines From". Complete the receipt.

Go to process request window and run costing background process.

Go back to Goods Receipt window and post it. Realize that value posted is 5000.00 (300 units + 16.67 €/unit).

Go to Product window, search by the product and navigate to Costing tab.
Realize that there are two cost related lines:

Line 1 - related to 200 units - Cost 15
Line 2 - related to 100 units - Cost 16.67 - total move qty 300 - ending date 31-12-9999

Go to Goods shipment and create a new one dated on 25/11/2014. Select the product and ship 150 units. Complete the shipment.

Go to process request window and run costing background process.

Go back to Goods Shipment window and post it. Realize that value posted is 2500.50 (150 units + 16.67 €/unit).

Go to purchase invoice window and create a new one based dated on 22/11/2014 for the first purchase order. Realize that 100 units are shown. Change the price from 20 to 25.00 €
Complete and post the invoice.

Go to process request window and run price correction background process.

Go to Product window, search by the product and navigate to Costing tab.
Realize that there are three cost related lines:

Line 1 - related to 200 units and Vendor receipt - Cost 15
Line 2 - related to 100 units and Vendor receipt - Cost 18.33 - total move qty 300
Line 3 - empty - Cost 18.34 - total mov qty 150 - Ending date 31-12-9999

This is not correct. Correct should be:
Line 1 - related to 200 units and Vendor receipt - Cost 15
Line 2 - related to 100 units and Vendor receipt - Cost 18.33 - total move qty 300 - Ending date 31-12-9999

Once more create a second purchase invoice for second purchase order dated on 24/11/2014. Realize that 200 units are shown. Change the price from 15.00 to 20.00. Complete and post the invoice.

Go to process request window and run price correction background process.

Go to Product window, search by the product and navigate to Costing tab.
Realize that there are four cost related lines:

Line 1 - related to 200 units and Vendor receipt - Cost 20
Line 2 - related to 100 units and Vendor receipt - Cost 21.67 - total move qty 300
Line 3 - empty - Cost 18.34 - total mov qty 150
Line 4 - empty - Cost 21.66 - total mov qty 150 - ending date 31-12-9999

This is not correct. Correct should be:

Line 1 - related to 200 units and Vendor receipt - Cost 20
Line 2 - related to 100 units and Vendor receipt - Cost 21.67 - total move qty 300
see steps to reproduce.

In summary, product transaction cost recalculation should not take care whenever last product transaction is an output transaction (shipment), therefore those empty inventory transactions are not created.

No tags attached.
Issue History
2014-11-06 18:09psanjuanNew Issue
2014-11-06 18:09psanjuanAssigned To => dmiguelez
2014-11-06 18:09psanjuanModules => Core
2014-11-06 18:09psanjuanTriggers an Emergency Pack => No
2014-11-07 09:19psanjuanAssigned Todmiguelez => umartirena
2014-11-07 09:19psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6981#r6981
2014-11-07 09:19psanjuanProposed Solution updated
2014-11-07 13:36hgbotCheckin
2014-11-07 13:36hgbotNote Added: 0071501
2014-11-07 13:36hgbotStatusnew => resolved
2014-11-07 13:36hgbotResolutionopen => fixed
2014-11-07 13:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/90b35b04c6afabfba28c6a03d5a95c1f2341c3ba [^]
2014-11-07 15:07psanjuanNote Added: 0071504
2014-11-07 15:07psanjuanStatusresolved => closed
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073029

Notes
(0071501)
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
---
(0071504)
psanjuan   
2014-11-07 15:07   
Verified. See excel sheet below:

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

Product: Costing 28114
(0073029)
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