Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0057893 | Openbravo ERP | 06. Material requirement planning (MRP) | public | 2025-02-03 14:06 | 2025-02-11 07:37 | |||||||
| Reporter | javietxe | |||||||||||
| Assigned To | kousalya_r | |||||||||||
| Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
| Status | closed | Resolution | fixed | |||||||||
| Platform | OS | 5 | OS Version | |||||||||
| Product Version | ||||||||||||
| Target Version | PR24Q4.2 | Fixed in Version | PR24Q4.1 | |||||||||
| Merge Request Status | approved | |||||||||||
| Review Assigned To | ||||||||||||
| OBNetwork customer | Gold | |||||||||||
| Web browser | ||||||||||||
| Modules | Core | |||||||||||
| Support ticket | ||||||||||||
| Regression level | ||||||||||||
| Regression date | ||||||||||||
| Regression introduced in release | ||||||||||||
| Regression introduced by commit | ||||||||||||
| Triggers an Emergency Pack | No | |||||||||||
| Summary | 0057893: 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())); | |||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| Issue History | ||||||||||||
| Date Modified | Username | Field | Change | |||||||||
| 2025-02-06 14:02 | jonae | Type | defect => backport | |||||||||
| 2025-02-06 14:02 | jonae | Target Version | => PR24Q4.2 | |||||||||
| 2025-02-10 07:55 | hgbot | Note Added: 0175360 | ||||||||||
| 2025-02-11 07:36 | hgbot | Merge Request Status | open => approved | |||||||||
| 2025-02-11 07:37 | hgbot | Resolution | open => fixed | |||||||||
| 2025-02-11 07:37 | hgbot | Status | scheduled => closed | |||||||||
| 2025-02-11 07:37 | hgbot | Note Added: 0175448 | ||||||||||
| 2025-02-11 07:37 | hgbot | Fixed in Version | => PR24Q4.1 | |||||||||
| 2025-02-11 07:37 | hgbot | Note Added: 0175449 | ||||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||