Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0030014 | Openbravo ERP | A. Platform | public | 2015-05-26 13:18 | 2015-06-01 13:02 |
|
Reporter | NaroaIriarte | |
Assigned To | NaroaIriarte | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q3 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0030014: The function OB.Utilities.Number.OBMaskedToOBPlain is not working properly with negative big numbers |
Description | If 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 Reproduce | 1) 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. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0025710 | 3.0PR14Q2 | closed | AugustoMauch | Big numbers are not properly managed in amount fields | related to | defect | 0028552 | 3.0PR15Q2 | closed | alostale | Purchase Invoice amount gets truncated upon saving, when the amount is big | related to | defect | 0028720 | | closed | alostale | System is not saving big numbers properly | related to | defect | 0029113 | 3.0PR15Q2 | closed | AugustoMauch | Openbravo interface is not rounding properly the database data | related to | defect | 0029709 | | closed | NaroaIriarte | Cannot save a physical inventory line with a negative small number in the Book Quantity field | related to | defect | 0026132 | 3.0PR14Q3 | closed | guillermogil | wrong visualization value of quantity fields with very small numbers |
|
Attached Files | |
|
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 | bug_revision_view_page.php?rev_id=8658#r8658 |
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 |
Notes |
|
(0077786)
|
hgbot
|
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
---
|
|
|
|
|
|
|
|