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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030014
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2015-05-26 13:182015-06-01 13:02
ReporterNaroaIriarteView Statuspublic 
Assigned ToNaroaIriarte 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revision03456ea1fc63
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030014: The function OB.Utilities.Number.OBMaskedToOBPlain is not working properly with negative big numbers

DescriptionIf the function OBMaskedToOBPlain is executed with a big negative number in scientific notation, or a positive number with a "+" sign at the beginning of the number, the retrieved decimal value is not correct.
For example: -1.0564E7 returns -10564000, which is correct, but -1.0564E8 returns -10564000 too, and that is not correct.
Steps To Reproduce1) Execute the following function in the console:

OB.Utilities.Number.OBMaskedToOBPlain('-1.0564E7', '.', ',')

2) It returns "-10564000" so, it works properly.
3) Execute the following function in the console:

OB.Utilities.Number.OBMaskedToOBPlain('-1.0564E8', '.', ',')

4) It returns "-10564000" so, it is not working properly.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00257103.0PR14Q2 closedAugustoMauch Big numbers are not properly managed in amount fields 
related to defect 00285523.0PR15Q2 closedalostale Purchase Invoice amount gets truncated upon saving, when the amount is big 
related to defect 0028720 closedalostale System is not saving big numbers properly 
related to defect 00291133.0PR15Q2 closedAugustoMauch Openbravo interface is not rounding properly the database data 
related to defect 0029709 closedNaroaIriarte Cannot save a physical inventory line with a negative small number in the Book Quantity field 
related to defect 00261323.0PR14Q3 closedguillermogil wrong visualization value of quantity fields with very small numbers 

-  Notes
(0077786)
hgbot (developer)
2015-05-27 09:29

Repository: erp/devel/pi
Changeset: 03456ea1fc636f400e0faa229ef942dd9fdc2ab4
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue May 26 17:30:26 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/03456ea1fc636f400e0faa229ef942dd9fdc2ab4 [^]

Fixed issue 30014: There are problems with big numbers in scientific notation

The problem was in OB.Utilities.Number.OBMaskedToOBPlain.
When the function was executed with a big negative number in scientific notation or a positive number with the "+" sign at the beginning, the
obtained decimal value was not correct.
This was caused because the length of the variable "number" (which was the number in scientific notation), was used for creating the final number instead of the
length of the variable "plainNumber", (which was the number in decimal notation).
This generated a problem because, when the spected result was a number longer than the number in scientific notation, it was not correctly obtained.
For example:

-1.0564E7 returned -10564000. This is correct, but:

-1.0564E8 returned -10564000. And this is not correct.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
---
(0077813)
hudsonbot (developer)
2015-05-27 15:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9cdfae4d18ae [^]
Maturity status: Test
(0077929)
alostale (developer)
2015-06-01 13:02

code reviewed

tested issues:
0026132
0029709
0028552
0028720
0025710
0030014

- Issue History
Date Modified Username Field Change
2015-05-26 13:18 NaroaIriarte New Issue
2015-05-26 13:18 NaroaIriarte Assigned To => platform
2015-05-26 13:18 NaroaIriarte Modules => Core
2015-05-26 13:18 NaroaIriarte Triggers an Emergency Pack => No
2015-05-26 13:19 NaroaIriarte Relationship added related to 0025710
2015-05-26 13:20 NaroaIriarte Relationship added related to 0028552
2015-05-26 13:20 NaroaIriarte Relationship added related to 0028720
2015-05-26 13:21 NaroaIriarte Relationship added depends on 0029113
2015-05-26 13:22 NaroaIriarte Relationship added related to 0029709
2015-05-26 13:22 NaroaIriarte Relationship added related to 0026132
2015-05-26 15:17 NaroaIriarte Relationship replaced related to 0029113
2015-05-26 16:28 NaroaIriarte Description Updated View Revisions
2015-05-27 09:29 hgbot Checkin
2015-05-27 09:29 hgbot Note Added: 0077786
2015-05-27 09:29 hgbot Status new => resolved
2015-05-27 09:29 hgbot Resolution open => fixed
2015-05-27 09:29 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/03456ea1fc636f400e0faa229ef942dd9fdc2ab4 [^]
2015-05-27 14:57 NaroaIriarte Issue Monitored: alostale
2015-05-27 14:58 NaroaIriarte Review Assigned To => alostale
2015-05-27 15:28 NaroaIriarte Assigned To platform => NaroaIriarte
2015-05-27 15:38 hudsonbot Checkin
2015-05-27 15:38 hudsonbot Note Added: 0077813
2015-06-01 13:02 alostale Note Added: 0077929
2015-06-01 13:02 alostale Status resolved => closed
2015-06-01 13:02 alostale Fixed in Version => 3.0PR15Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker