Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023035Openbravo ERP04. Warehouse managementpublic2013-02-11 22:342013-02-20 04:50
VictorVillar 
dmiguelez 
immediatemajorsometimes
closedfixed 
5
 
3.0MP21 
dmiguelez
Core
No
0023035: Randomly wrong cost calculation for Goods movements transactions
Randomly wrong cost calculation for Goods movements transactions.
Under some circunstancies, not defined yet, it happens that the cost for one of Goods Movement transaction (incoming) is 0.

The reason could be that TransactionCostList object is empty on getTransactionCost() method in CostingUtils.java
There could be two solutions:

1.- See the attached .diff

2.- On the CostingServer.java, createTransactionCost() method, we have:

TransactionCost transactionCost = OBProvider.getInstance().get(TransactionCost.class);
...
OBDal.getInstance().save(transactionCost);

and the solution could be:

List<TransactionCost> tcostList = transaction.getTransactionCostList();
tcostList.add(transactionCost);
No tags attached.
diff 19459.diff (509) 2013-02-11 22:34
https://issues.openbravo.com/file_download.php?file_id=5966&type=bug
Issue History
2013-02-11 22:34VictorVillarNew Issue
2013-02-11 22:34VictorVillarAssigned To => dmiguelez
2013-02-11 22:34VictorVillarFile Added: 19459.diff
2013-02-11 22:34VictorVillarModules => Core
2013-02-11 22:34VictorVillarTriggers an Emergency Pack => No
2013-02-11 22:34VictorVillarIssue Monitored: networkb
2013-02-11 22:47VictorVillarNote Added: 0056351
2013-02-11 22:52VictorVillarSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4397#r4397
2013-02-11 22:53VictorVillarReproducibilityalways => sometimes
2013-02-18 15:51hgbotCheckin
2013-02-18 15:51hgbotNote Added: 0056524
2013-02-18 15:51hgbotStatusnew => resolved
2013-02-18 15:51hgbotResolutionopen => fixed
2013-02-18 15:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/175182b0760a68e06dce64b19afdbdeb59a76957 [^]
2013-02-18 16:24dmiguelezReview Assigned To => dmiguelez
2013-02-18 16:24dmiguelezNote Added: 0056527
2013-02-18 16:24dmiguelezStatusresolved => closed
2013-02-20 04:50hudsonbotCheckin
2013-02-20 04:50hudsonbotNote Added: 0056621

Notes
(0056351)
VictorVillar   
2013-02-11 22:47   
Also Support Ticket: 19117
(0056524)
hgbot   
2013-02-18 15:51   
Repository: erp/devel/pi
Changeset: 175182b0760a68e06dce64b19afdbdeb59a76957
Author: Victor Villar <victor.villar <at> openbravo.com>
Date: Mon Feb 18 15:49:53 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/175182b0760a68e06dce64b19afdbdeb59a76957 [^]

Fixed issue 23035: Randomly wrong cost calculation for Goods movements transactions

---
M src/org/openbravo/costing/CostingServer.java
---
(0056527)
dmiguelez   
2013-02-18 16:24   
Code Review + Testing OK
(0056621)
hudsonbot   
2013-02-20 04:50   
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/d828167a9e83 [^]

Maturity status: Test