Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0029076 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 04. Warehouse management | major | always | 2015-02-26 12:44 | 2015-03-09 20:01 | |||
Reporter | umartirena | View Status | public | |||||
Assigned To | umartirena | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | pi | |||
Status | closed | Fix in branch | Fixed in SCM revision | 67607f6caaee | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | aferraz | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | 3.0PR14Q4 | |||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0029076: [Cost Adjustments] / by zero error while calculating backdated cost for movement qty 0 receipt | |||||||
Description | / by zero error is obtained in Cost Adjustments while calculating backdated cost for movement qty 0 receipts. | |||||||
Steps To Reproduce | In pgadmin III, open m_inout_post function: * Comment the 3 following lines (not reproducible in pi due to this issue https://issues.openbravo.com/view.php?id=26163 [^]): IF v_Message_Qty != '' THEN RAISE EXCEPTION '%', '@Inline@ '||v_Message_Qty||' '||'@ProductNotNullAndMovementQtyZero@' ; --OBTG:-20000-- END IF; * Save the function. In live.builds as F&B International: * Create a Product for F&B España. Add a Purchase Pricelist of 10. * Go to Goods Receipt and create a Header: - Org: F&B España - Movement Date: 05/02/2015 * Add a line: - Product: The created product - Movement Qty: 10 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 15/02/2015 * Add a line: - Product: The created product - Movement Qty: 0 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 10/02/2015 * Add a line: - Product: The created product - Movement Qty: 12 * Complete it * Run Costing Background process * Realize that following error is obtained: ERROR org.openbravo.costing.CostingBackground - / by zero java.lang.ArithmeticException: / by zero at java.math.BigDecimal.divideAndRound(BigDecimal.java:1424) at java.math.BigDecimal.divide(BigDecimal.java:1398) at java.math.BigDecimal.divide(BigDecimal.java:1513) at org.openbravo.costing.AverageCostAdjustment.getRelatedTransactionsByAlgorithm(AverageCostAdjustment.java:305) at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchRelatedTransactionCosts(CostingAlgorithmAdjustmentImp.java:160) | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0074998) hgbot (developer) 2015-02-26 19:36 |
Repository: erp/devel/pi Changeset: 67607f6caaeef3bbc200e13b54801928b42396ee Author: Unai Martirena <unai.martirena <at> openbravo.com> Date: Thu Feb 26 15:29:20 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/67607f6caaeef3bbc200e13b54801928b42396ee [^] Fixes bug 29076: Division by zero error managed in Costing Background. Under certain circumnstance a division by zero error was happening in Cost Adjustments process inside Costing Background (when calculating backdated adjustments of a transaction of movementqty zero). This problem has been managed by being sure that this division will not happen again. If the movementqty of the transaction is zero, the cost of the full transaction will be zero as well. --- M src/org/openbravo/costing/AverageCostAdjustment.java --- |
(0075049) hudsonbot (viewer) 2015-02-27 16:11 |
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/7f9c56fa7aba [^] Maturity status: Test |
(0075251) aferraz (viewer) 2015-03-06 15:18 |
Code review + Testing OK |
(0075293) umartirena (viewer) 2015-03-09 09:31 |
Reopened to add backport for 3.0PR15Q1.2 |
![]() |
|||
Date Modified | Username | Field | Change |
2015-02-26 12:44 | umartirena | New Issue | |
2015-02-26 12:44 | umartirena | Assigned To | => Sandrahuguet |
2015-02-26 12:44 | umartirena | OBNetwork customer | => No |
2015-02-26 12:44 | umartirena | Modules | => Core |
2015-02-26 12:44 | umartirena | Regression introduced in release | => 3.0PR14Q4 |
2015-02-26 12:44 | umartirena | Triggers an Emergency Pack | => No |
2015-02-26 12:44 | umartirena | Assigned To | Sandrahuguet => umartirena |
2015-02-26 13:03 | umartirena | Steps to Reproduce Updated | View Revisions |
2015-02-26 15:41 | umartirena | Steps to Reproduce Updated | View Revisions |
2015-02-26 19:36 | hgbot | Checkin | |
2015-02-26 19:36 | hgbot | Note Added: 0074998 | |
2015-02-26 19:36 | hgbot | Status | new => resolved |
2015-02-26 19:36 | hgbot | Resolution | open => fixed |
2015-02-26 19:36 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/67607f6caaeef3bbc200e13b54801928b42396ee [^] |
2015-02-27 16:11 | hudsonbot | Checkin | |
2015-02-27 16:11 | hudsonbot | Note Added: 0075049 | |
2015-03-06 15:18 | aferraz | Review Assigned To | => aferraz |
2015-03-06 15:18 | aferraz | Note Added: 0075251 | |
2015-03-06 15:18 | aferraz | Status | resolved => closed |
2015-03-09 09:31 | umartirena | Note Added: 0075293 | |
2015-03-09 09:31 | umartirena | Status | closed => new |
2015-03-09 09:31 | umartirena | Resolution | fixed => open |
2015-03-09 09:31 | umartirena | Status | new => scheduled |
2015-03-09 09:31 | umartirena | Status | scheduled => resolved |
2015-03-09 09:31 | umartirena | Fixed in Version | => pi |
2015-03-09 09:31 | umartirena | Resolution | open => fixed |
2015-03-09 09:32 | umartirena | Status | resolved => closed |
2015-03-09 20:01 | dmitry_mezentsev | Tag Attached: Approved | |
2015-03-09 20:01 | dmitry_mezentsev | Tag Detached: Approved |
Copyright © 2000 - 2009 MantisBT Group |