Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028192Openbravo ERP04. Warehouse managementpublic2014-11-17 15:032014-12-30 23:26
aferraz 
umartirena 
urgentmajorhave not tried
closedfixed 
30Professional Appliance
 
pi 
Sandrahuguet
Core
No
0028192: [Costing] Net Unit Price field in Costing tab is not properly calculated
[Costing] Net Unit Price field in Costing tab is not properly calculated
In QA Testing client create a new product named "Costing GM12". Select a purchase price list. Enter a unit/list price of 11.00

Go to purchase order window and create a new one dated on 29/10/2014. Enter 820 units. Book the order.

Go to goods receipt window and create a new one dated on 3/11/2014. Select the order and receipt 820 units. Complete the receipt

Go to process request window and launch costing background process.

Go back to goods receipt window and post it. Realize that value posted is 9020 ( 820 units * 11.00 €/unit)

Go to Goods Movement Window and create a new one dated on 13/11/2014

Move 400 units from Spain Warehouse to another warehouse named Spain West Warehouse, for instance. Complete the movement.

Go to process request window and launch costing background process.

Go to goods movement and post it. Realize that the value posted is 4400 ( 400 units + 11 €/unit)

Go to product window and search by the product. Go to transaction tab.
Select Movement From transaction and press the button "Manual Cost Adjustment".

In total cost field enter a total cost amount = -400. Enter 18/11/2014 as accounting date, select the flag "Incremental" but do not select the flag "Unit Cost". Press Done/OK.

After this a purchase invoice needs to be created dated on 8/11/2014. Create it by using Create Lines From, select the receipt. Realize that 820 units are shown. Change the price from 11.00 to 15.00. Complete and post the invoice. Realize that total value posted is 12300 (820 units * 15.00 €/unit).

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

Go to product window and search by the product. Go to Transaction tab and realize that there are 3 lines:

- Transaction 1: Movement Quantity 820 - Transaction Original Cost 9,020.00 - Total Cost 12,300.00 - Unit Cost 12,300.00

- Transaction 2: Movement Quantity -400 - Transaction Original Cost 4,400.00 - Total Cost 5,600.00 - Unit Cost 6,000.00

- Transaction 3: Movement Quantity 400 - Transaction Original Cost 4,400.00 - Total Cost 5,600.00 - Unit Cost 5,600.00

Go to Costing tab and realize that there are 3 lines:

- Line 1: Cost 15 - Net Unit Price 15.00 - Original Cost 11

- Line 2: Cost 14 - Net Unit Price 14.00 - Original Cost 11

- Line 3: Cost 15.9524 - Net Unit Price 6.00 - Original Cost 11.9524

Line 3 is not correct. It should be:

- Line 3: Cost 15.9524 - Net Unit Price 15.95 (because that is the cost of the Movement From transacton) - Original Cost 11.9524
See above
No tags attached.
related to defect 0028301 closed umartirena [Costing] Cost not properly calculated after booking two backdated transactions 
Issue History
2014-11-17 15:03aferrazNew Issue
2014-11-17 15:03aferrazAssigned To => Sandrahuguet
2014-11-17 15:03aferrazModules => Core
2014-11-17 15:03aferrazTriggers an Emergency Pack => No
2014-11-18 11:18psanjuanSummaryNet Unit Price field in Costing tab is not properly calculated => [Costing] Net Unit Price field in Costing tab is not properly calculated
2014-11-18 11:18psanjuanDescription Updatedbug_revision_view_page.php?rev_id=7071#r7071
2014-12-01 10:40psanjuanRelationship addedrelated to 0028301
2014-12-01 12:16umartirenaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7192#r7192
2014-12-04 12:21hgbotCheckin
2014-12-04 12:21hgbotNote Added: 0072280
2014-12-04 12:21hgbotStatusnew => resolved
2014-12-04 12:21hgbotResolutionopen => fixed
2014-12-04 12:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bc6fcc83e7dc2b93c3b615fc0f540457062f512a [^]
2014-12-04 15:03psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7216#r7216
2014-12-05 10:43psanjuanNote Added: 0072303
2014-12-05 10:43psanjuanStatusresolved => closed
2014-12-05 10:48psanjuanNote Added: 0072304
2014-12-05 10:48psanjuanStatusclosed => new
2014-12-05 10:48psanjuanStatusnew => scheduled
2014-12-05 10:54umartirenaStatusscheduled => resolved
2014-12-05 10:54umartirenaFixed in Version => pi
2014-12-05 10:54umartirenaFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/bc6fcc83e7dc2b93c3b615fc0f540457062f512a [^] => https://code.openbravo.com/erp/devel/pi/rev/bc6fcc83e7dc2b93c3b615fc0f540457062f512a [^]
2014-12-12 08:08SandrahuguetAssigned ToSandrahuguet => umartirena
2014-12-12 12:35SandrahuguetReview Assigned To => gorkaion
2014-12-19 10:44SandrahuguetReview Assigned Togorkaion => Sandrahuguet
2014-12-19 10:44SandrahuguetNote Added: 0072723
2014-12-19 10:44SandrahuguetStatusresolved => closed
2014-12-30 23:26hudsonbotCheckin
2014-12-30 23:26hudsonbotNote Added: 0073172

Notes
(0072280)
hgbot   
2014-12-04 12:21   
Repository: erp/devel/pi
Changeset: bc6fcc83e7dc2b93c3b615fc0f540457062f512a
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Dec 04 12:20:59 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bc6fcc83e7dc2b93c3b615fc0f540457062f512a [^]

Fixes issue 28192: Net Unit Price now is properly calculated.

In order to calculate the Net Unit Price, the adjustments of the transaction are used, but it was not being used the signMultiplier of the transaction, and needs to be used.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0072303)
psanjuan   
2014-12-05 10:43   
Verified.
(0072304)
psanjuan   
2014-12-05 10:48   
Issue resolved that was closed by mistake.
Code review required to close the issue.
(0072723)
Sandrahuguet   
2014-12-19 10:44   
Code review done
(0073172)
hudsonbot   
2014-12-30 23:26   
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