Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029432Openbravo ERP04. Warehouse managementpublic2015-03-26 12:262015-04-01 08:31
umartirena 
umartirena 
highmajoralways
closedfixed 
5
 
3.0PR15Q1.2 
aferraz
Core
No
0029432: [Cost Adjustment] Net Unit Price in Costing tab is not being properly calculated in certain cases
Net Unit Price in Costing tab is not being properly calculated in certain cases. There is a case in which this value is being set equals to cost, and this is wrong.
Run testCostingAAA() test.

As QA Testing Admin.
Go to Product window and select the product just created.
Go to Costing tab.
Realize that in the second Costing record the Net Unit Price is 68.00, when it should be 80.00 (150 * 70 + 1500) / 150.



No tags attached.
blocks defect 00294303.0PR15Q2 closed umartirena [Cost Adjustment] Net Unit Price in Costing tab is not being properly calculated in certain cases 
Issue History
2015-03-26 12:27umartirenaTypedefect => backport
2015-03-26 12:27umartirenaTarget Version => 3.0PR15Q1.2
2015-03-30 12:08hgbotCheckin
2015-03-30 12:08hgbotNote Added: 0076130
2015-03-30 12:08hgbotStatusscheduled => resolved
2015-03-30 12:08hgbotResolutionopen => fixed
2015-03-30 12:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/5ca3e211bea2defd28a22e528918190fb5b4838a [^]
2015-03-30 12:11aferrazReview Assigned To => aferraz
2015-03-30 12:11aferrazNote Added: 0076131
2015-03-30 12:11aferrazStatusresolved => closed
2015-03-30 12:37aferrazAssigned ToSandrahuguet => umartirena
2015-04-01 08:11hgbotCheckin
2015-04-01 08:11hgbotNote Added: 0076245
2015-04-01 08:11hgbotStatusclosed => resolved
2015-04-01 08:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/5ca3e211bea2defd28a22e528918190fb5b4838a [^] => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/5ca3e211bea2defd28a22e528918190fb5b4838a [^]
2015-04-01 08:31priyamStatusresolved => closed
2015-04-01 08:31priyamNote Added: 0076246

Notes
(0076130)
hgbot   
2015-03-30 12:08   
Repository: erp/backports/3.0PR15Q1.2
Changeset: 5ca3e211bea2defd28a22e528918190fb5b4838a
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Mon Mar 30 11:19:36 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/5ca3e211bea2defd28a22e528918190fb5b4838a [^]

Fixes bug 29432: Net Unit Price in Costing is properly calculated

Using Cost Adjustments the Net Unit Price of a product on a transaction could be affected with those. Starting from now the Net Unit Price assigned in Costing tab is going to take into account the Cost Adjustments of type Unit Cost.

So the calculation would be: ((originalPrice * qty) + adjustmentsAmount) / qty.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0076131)
aferraz   
2015-03-30 12:11   
Code review + Testing OK
(0076245)
hgbot   
2015-04-01 08:11   
Repository: erp/backports/3.0PR15Q2
Changeset: 5ca3e211bea2defd28a22e528918190fb5b4838a
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Mon Mar 30 11:19:36 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/5ca3e211bea2defd28a22e528918190fb5b4838a [^]

Fixes bug 29432: Net Unit Price in Costing is properly calculated

Using Cost Adjustments the Net Unit Price of a product on a transaction could be affected with those. Starting from now the Net Unit Price assigned in Costing tab is going to take into account the Cost Adjustments of type Unit Cost.

So the calculation would be: ((originalPrice * qty) + adjustmentsAmount) / qty.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0076246)
priyam   
2015-04-01 08:31   
closed again, as the status changed due the merge tag of 3.0PR15Q1.2 to backports/3.0PR15Q2