Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039993 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 04. Warehouse management | major | always | 2019-01-22 11:14 | 2019-03-28 14:56 | |||
Reporter | ngarcia | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR19Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 94c8cd7d1c55 | ||||
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 | Sandrahuguet | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 7575 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0039993: / by zero error in Costing Background Process with backdated and negative stock correction and voided goods receipt | |||||||
Description | / by zero error in Costing Background Process with backdated and negative stock correction and voided goods receipt | |||||||
Steps To Reproduce | As group admin role: Set the 'Enable Negative Stock Corrections' to Y Log out and log in Go to Costing Rules window, select 'F&B España, S.A', launch 'Fix Backdated Transactions' process with '01-01-2019' starting date Create a new product Set a price of 5 in Tarifa Bebidas Alegres Create a new goods receipt with '16-01-2019' movement date and 2 units of the product Create a new goods shipment with '17-01-2019' movement date and 2 units of the product Void the goods receipt with a movement date of 'today' Create a purchase order with '16-01-2019' movement date and 2 units of the product. Increase its price to 7 Create the related goods receipt with a movement date of '16-01-2019' Launch the Costing Background Process and check the following message is shown in Process Log field: / by zero The log shows: [DefaultQuartzScheduler_Worker-8] ERROR org.openbravo.costing.CostingBackground - / by zero java.lang.ArithmeticException: / by zero at java.math.BigDecimal.divideAndRound(BigDecimal.java:4106) ~[?:1.8.0_171] at java.math.BigDecimal.divide(BigDecimal.java:5183) ~[?:1.8.0_171] at java.math.BigDecimal.divide(BigDecimal.java:1561) ~[?:1.8.0_171] at java.math.BigDecimal.divide(BigDecimal.java:1591) ~[?:1.8.0_171] at org.openbravo.costing.AverageCostAdjustment.getRelatedTransactionsByAlgorithm(AverageCostAdjustment.java:376) ~[AverageCostAdjustment.class:?] at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchRelatedTransactionCosts(CostingAlgorithmAdjustmentImp.java:164) ~[CostingAlgorithmAdjustmentImp.class:?] at org.openbravo.costing.CostAdjustmentProcess.calculateAdjustmentAmount(CostAdjustmentProcess.java:235) ~[CostAdjustmentProcess.class:?] at org.openbravo.costing.CostAdjustmentProcess.processCostAdjustment(CostAdjustmentProcess.java:86) ~[CostAdjustmentProcess.class:?] at org.openbravo.costing.CostAdjustmentProcess.doProcessCostAdjustment(CostAdjustmentProcess.java:339) ~[CostAdjustmentProcess.class:?] at org.openbravo.costing.CostingServer.createAdjustment(CostingServer.java:385) ~[CostingServer.class:?] at org.openbravo.costing.CostingServer.checkCostAdjustments(CostingServer.java:313) ~[CostingServer.class:?] at org.openbravo.costing.CostingServer.process(CostingServer.java:136) ~[CostingServer.class:?] at org.openbravo.costing.CostingBackground.doExecute(CostingBackground.java:137) [CostingBackground.class:?] at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:84) [DalBaseProcess.class:?] at org.openbravo.scheduling.DefaultJob.execute(DefaultJob.java:64) [DefaultJob.class:?] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.2.jar:1.6.2] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.2.jar:1.6.2] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0109294) AtulOpenbravo (viewer) 2019-01-29 09:40 |
- Login as F&B International Group admin role: - Set the 'Enable Negative Stock Corrections' to Y Log out and log in - Go to Costing Rules window, select 'F&B España, S.A', launch 'Fix Backdated Transactions' process with '01-01-2019' starting date - Create a new product - Set a price of 5 in Tarifa Bebidas Alegres - Create a new goods receipt with '16-01-2019' movement date and 2 units of the product - Create a new goods shipment with '17-01-2019' movement date and 2 units of the product - Void the goods receipt with '16-01-2019' movement date and in pop up enter void date as 'today'. (This step will raise error for insufficient stock. To avoid this error, change status of storage to Undefined - OverIssue) - Create a purchase order with '16-01-2019' movement date and 2 units of the product. Increase its price to 7 - Create the related goods receipt with a movement date of '16-01-2019' - Launch the Costing Background Process and check the following message is shown in process log is Process completed successfully. |
(0109600) hgbot (developer) 2019-02-05 17:40 |
Repository: erp/devel/pi Changeset: 94c8cd7d1c55e39587b68a2fe4e3a67b7e79bac9 Author: Atul Gaware <atul.gaware <at> openbravo.com> Date: Tue Jan 29 23:13:57 2019 +0530 URL: http://code.openbravo.com/erp/devel/pi/rev/94c8cd7d1c55e39587b68a2fe4e3a67b7e79bac9 [^] Fixes Issue 0039993: / by zero error in Costing Background Process with backdated and negative stock correction and voided goods receipt In case of negative stock correction, handle divide by zero when currentStock value is zero --- M src/org/openbravo/costing/AverageCostAdjustment.java --- |
(0109601) Sandrahuguet (viewer) 2019-02-05 17:42 |
Code review + testing OK |
(0110797) hudsonbot (viewer) 2019-03-28 14:56 |
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/b2fbc1588df4 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2019-01-22 11:14 | ngarcia | New Issue | |
2019-01-22 11:14 | ngarcia | Assigned To | => Triage Finance |
2019-01-22 11:14 | ngarcia | OBNetwork customer | => OBPS |
2019-01-22 11:14 | ngarcia | Modules | => Core |
2019-01-22 11:14 | ngarcia | Support ticket | => 7575 |
2019-01-22 11:14 | ngarcia | Resolution time | => 1549926000 |
2019-01-22 11:14 | ngarcia | Triggers an Emergency Pack | => No |
2019-01-22 11:15 | ngarcia | Issue Monitored: networkb | |
2019-01-22 11:45 | Practics | Issue Monitored: Practics | |
2019-01-24 16:53 | Sandrahuguet | Assigned To | Triage Finance => AtulOpenbravo |
2019-01-28 16:50 | ngarcia | Steps to Reproduce Updated | View Revisions |
2019-01-29 09:40 | AtulOpenbravo | Status | new => scheduled |
2019-01-29 09:40 | AtulOpenbravo | Note Added: 0109294 | |
2019-02-05 17:40 | hgbot | Checkin | |
2019-02-05 17:40 | hgbot | Note Added: 0109600 | |
2019-02-05 17:40 | hgbot | Status | scheduled => resolved |
2019-02-05 17:40 | hgbot | Resolution | open => fixed |
2019-02-05 17:40 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/94c8cd7d1c55e39587b68a2fe4e3a67b7e79bac9 [^] |
2019-02-05 17:42 | Sandrahuguet | Review Assigned To | => Sandrahuguet |
2019-02-05 17:42 | Sandrahuguet | Note Added: 0109601 | |
2019-02-05 17:42 | Sandrahuguet | Status | resolved => closed |
2019-02-05 17:42 | Sandrahuguet | Fixed in Version | => 3.0PR19Q2 |
2019-03-28 14:56 | hudsonbot | Checkin | |
2019-03-28 14:56 | hudsonbot | Note Added: 0110797 |
Copyright © 2000 - 2009 MantisBT Group |