Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0057893 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| backport | [Openbravo ERP] 06. Material requirement planning (MRP) | major | have not tried | 2025-02-03 14:06 | 2025-02-11 07:37 | |||
| Reporter | javietxe | View Status | public | |||||
| Assigned To | kousalya_r | |||||||
| Priority | normal | Resolution | fixed | Fixed in Version | PR24Q4.1 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | |||||
| Projection | none | ETA | none | Target Version | PR24Q4.2 | |||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | SCM revision | |||||||
| 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())); | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||
|
||||||||
Notes |
|
|
(0175360) hgbot (developer) 2025-02-10 07:55 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1528 [^] |
|
(0175448) hgbot (developer) 2025-02-11 07:37 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1528 [^] |
|
(0175449) hgbot (developer) 2025-02-11 07:37 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo [^] Changeset: ae9e32881b3587f70f726548807abda19fbf9fb4 Author: Kousalya Ramasamy <k.ramasamy@external.orisha.com> Date: 10-02-2025 12:23:49 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/commit/ae9e32881b3587f70f726548807abda19fbf9fb4 [^] Fixed ISSUE-57893: Added Rounding mode to handle non-terminating arthimetic exception --- M src/org/openbravo/materialmgmt/ServicePriceUtils.java --- |
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 | |
| Copyright © 2000 - 2009 MantisBT Group |