Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0057841 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 06. Material requirement planning (MRP) | major | have not tried | 2025-02-03 14:06 | 2025-02-11 07:36 | |||
Reporter | javietxe | View Status | public | |||||
Assigned To | kousalya_r | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | PR25Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0057841: BigDecimal.divide(BigDecimal) does not specify a rounding mode | |||||||
Description | There is an arithmetic division that is not being handled correctly in the class ServicePriceUtils.java . In the getServiceAmoutnt method, if olsr.getAmount() and olsr.getQuantity() result in a non-terminating decimal expansion, such as: 10 / 3 = 3.3333333333... Java throws ArithmeticException. | |||||||
Steps To Reproduce | In Terrena happening due to a customization. | |||||||
Proposed Solution | Add the precision and rounding in the next lines. Class: openbravo/src/org/openbravo/materialmgmt/ServicePriceUtils.java Method getServiceAmount Lines: relatedPrices.put(olsr.getQuantity().compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : olsr.getAmount().divide(olsr.getQuantity())); | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0175136) jonae (developer) 2025-02-05 08:08 |
Jira - https://openbravo.atlassian.net/browse/RM-20986 [^] |
(0175147) hgbot (developer) 2025-02-05 08:50 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1520 [^] |
(0175446) hgbot (developer) 2025-02-11 07:36 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1520 [^] |
(0175447) hgbot (developer) 2025-02-11 07:36 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo [^] Changeset: a4095963e4e5322a65bedb671b311e9ab0f18e78 Author: Kousalya Ramasamy <k.ramasamy@external.orisha.com> Date: 11-02-2025 06:36:20 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/commit/a4095963e4e5322a65bedb671b311e9ab0f18e78 [^] Fixed ISSUE-57841: Added Rounding mode to handle non-terminating arthimetic exception --- M src/org/openbravo/materialmgmt/ServicePriceUtils.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2025-02-03 14:06 | javietxe | New Issue | |
2025-02-03 14:06 | javietxe | Assigned To | => Triage Omni OMS |
2025-02-03 14:06 | javietxe | Modules | => Core |
2025-02-03 14:06 | javietxe | Triggers an Emergency Pack | => No |
2025-02-03 14:06 | javietxe | Issue Monitored: javietxe | |
2025-02-05 08:08 | jonae | Note Added: 0175136 | |
2025-02-05 08:08 | jonae | Assigned To | Triage Omni OMS => kousalya_r |
2025-02-05 08:50 | hgbot | Note Added: 0175147 | |
2025-02-06 14:02 | jonae | Status | new => scheduled |
2025-02-11 07:36 | hgbot | Note Added: 0175446 | |
2025-02-11 07:36 | hgbot | Resolution | open => fixed |
2025-02-11 07:36 | hgbot | Status | scheduled => closed |
2025-02-11 07:36 | hgbot | Fixed in Version | => PR25Q2 |
2025-02-11 07:36 | hgbot | Note Added: 0175447 |
Copyright © 2000 - 2009 MantisBT Group |