Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023911Openbravo ERP04. Warehouse managementpublic2013-05-24 09:552013-06-20 02:07
VictorVillar 
jonalegriaesarte 
urgentmajoralways
closedfixed 
5
pi 
3.0MP25 
jecharri
Core
No
0023911: It is not possible to migrate to the new costing server if you are using second UOM, under some circunstancies
It is not possible to migrate to the new costing server if you are using second UOM. When you have not got stock for the first unit of measure, but you have stock for the second unit of measure, you can not migrate.
You get '/ by zero' error when the process calculates the cost:

Please check, CostingMigrationProcess.java, calculateCosts method, line: 406

  BigDecimal cost = trxCost.divide(trx.getMovementQuantity().abs(), costPrecision, BigDecimal.ROUND_HALF_UP);

the problem is that the MovementQuantity is zero
It is not possible to migrate to the new costing server if you are using second UOM. When you have not got stock for the first unit of measure, but you have stock for the second unit of measure, you can not migrate.
You get '/ by zero' error when the process calculates the cost:

Please check, CostingMigrationProcess.java, calculateCosts method, line: 406

  BigDecimal cost = trxCost.divide(trx.getMovementQuantity().abs(), costPrecision, BigDecimal.ROUND_HALF_UP);

the problem is that the MovementQuantity is zero
The transaction cost for these transactions should be 0.
No tags attached.
Issue History
2013-05-24 09:55VictorVillarNew Issue
2013-05-24 09:55VictorVillarAssigned To => dmiguelez
2013-05-24 09:55VictorVillarModules => Core
2013-05-24 09:55VictorVillarTriggers an Emergency Pack => No
2013-05-24 09:55VictorVillarIssue Monitored: networkb
2013-05-24 14:07dmiguelezAssigned Todmiguelez => jonalegriaesarte
2013-06-03 16:38jonalegriaesarteTarget Version3.0MP24 => 3.0MP25
2013-06-06 17:35hgbotCheckin
2013-06-06 17:35hgbotNote Added: 0059249
2013-06-06 17:35hgbotStatusnew => resolved
2013-06-06 17:35hgbotResolutionopen => fixed
2013-06-06 17:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c6159ccd2e9c9fe26a6c0195a14c549f6edaba06 [^]
2013-06-17 16:58jecharriReview Assigned To => jecharri
2013-06-17 16:58jecharriStatusresolved => closed
2013-06-20 02:07hudsonbotCheckin
2013-06-20 02:07hudsonbotNote Added: 0059547

Notes
(0059249)
hgbot   
2013-06-06 17:35   
Repository: erp/devel/pi
Changeset: c6159ccd2e9c9fe26a6c0195a14c549f6edaba06
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jun 06 17:34:05 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c6159ccd2e9c9fe26a6c0195a14c549f6edaba06 [^]

Fixes Issue 23911. Fixes division by zero.

---
M src/org/openbravo/costing/CostingMigrationProcess.java
---
(0059547)
hudsonbot   
2013-06-20 02:07   
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/5caf871044ad [^]

Maturity status: Test