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-06 14:02 | |||||||
Reporter | javietxe | View Status | public | |||||||||
Assigned To | kousalya_r | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | scheduled | 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 [^] |
![]() |
|||
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 |
Copyright © 2000 - 2009 MantisBT Group |