Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0008134
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajoralways2009-03-12 16:352009-03-26 18:02
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PriorityhighResolutionfixedFixed in Version2.40MP4
StatusclosedFix in branch2.40Fixed in SCM revisionae2fd76d5f21
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0008134: Double representation should not be used for numbers as it is inprecise

DescriptionDouble's are still used as intermediate representation in two places. Depending on values and configured precision this leads to wrong numbers displayed to the user.

XmlEngine/DataGrid (still) use Double when formatting according to formats defined in Format.xml
Steps To Reproduce- Go to MRP -> Manufacturing plan
- Enter a header
- Enter a single line
- Execute the following sql in the underlying database (just to shortcut the process of entering this value):
update mrp_run_productionline set qty = '0.77777777777777777777777777';
- Last step changes the quantity of all Manufacturingplan lines to this value.
- edit config/Format.xml
  change the formatOutput value for "qtyRelation" to "#,##0.###############################"
- display the manufacturing plan line again and so that not the correct value (as entered in the update step) is displayed but a different one.
- The correct value should be displayed as the configured Format.xml entry has more digits as the example quantity value.
Proposed SolutionFix XmlEngine & DataGrid to not use double as intermediate format when formatting numbers.

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0008098 closedshuehner Double representation should not be used for numbers as it is inprecise 

-  Notes
(0014785)
hgbot (developer)
2009-03-18 13:54

Repository: erp/stable/2.40
Changeset: ae2fd76d5f215377d8a73f45005c56750dad203d
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Mar 18 13:25:37 2009 +0100
URL: http://code.openbravo.com/erp/stable/2.40/rev/ae2fd76d5f215377d8a73f45005c56750dad203d [^]

Fixed 8134: changed outputformatting in edit & grid view to not use double as intermediate representation
Use BigDecimal instead to avoid floating point problems

---
M src-core/src/org/openbravo/xmlEngine/FieldValue.java
M src/org/openbravo/erpCommon/utility/DataGrid.java
---

- Issue History
Date Modified Username Field Change
2009-03-16 11:39 rafaroda Type defect => backport
2009-03-16 11:39 rafaroda fix_in_branch => 2.40
2009-03-18 13:54 hgbot Checkin
2009-03-18 13:54 hgbot Note Added: 0014785
2009-03-18 13:54 hgbot Status scheduled => resolved
2009-03-18 13:54 hgbot Resolution open => fixed
2009-03-18 13:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/ae2fd76d5f215377d8a73f45005c56750dad203d [^]
2009-03-24 11:01 psarobe Fixed in Version => 2.40MP4
2009-03-26 18:02 psarobe Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker