Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0012100 | Openbravo ERP | 07. Sales management | public | 2010-02-02 17:38 | 2010-03-10 18:29 |
|
Reporter | networkb | |
Assigned To | dbaz | |
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 2.50MP11 | |
Target Version | 2.50MP14 | Fixed in Version | 2.50MP12 | |
Merge Request Status | |
Review Assigned To | |
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 | 0012100: Firefox doesn't add numbers correctly in Sales Management |
Description | We have to cofigure Firefox:
-about:config
-dom.disable_window_status_change: false
We need a sale invoice with amount: 1000 or more.
|
Steps To Reproduce | We have to cofigure Firefox:
-about:config
-dom.disable_window_status_change: false
-As Openbravo Admin go to Sales Management || Transactions || Sales Invoice
-In the Grid mode select 3 sales (One of them > 1000)
-Put the cursor over 'Grand Total Amount'.
-Realize that on the lower left corner appears a wrong number
|
Proposed Solution | On Purchase Management the behaviour is correct. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0008177 | | closed | shuehner | Calculations done by XmlEngine (i.e. sum) are done using double. which leads to calculation errors. | related to | backport | 0012222 | | closed | dbaz | Firefox doesn't add numbers correctly in Sales Management |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2010-02-02 17:38 | networkb | New Issue | |
2010-02-02 17:38 | networkb | Assigned To | => rafaroda |
2010-02-02 21:21 | shuehner | Note Added: 0023914 | |
2010-02-02 21:22 | shuehner | Relationship added | related to 0008177 |
2010-02-02 21:23 | shuehner | Note Added: 0023915 | |
2010-02-02 21:23 | shuehner | Issue Monitored: shuehner | |
2010-02-03 10:53 | networkb | Target Version | 2.50MP14 => 2.50MP13 |
2010-02-03 11:18 | rafaroda | Note Added: 0023924 | |
2010-02-03 11:18 | rafaroda | Assigned To | rafaroda => dbaz |
2010-02-04 15:47 | hgbot | Checkin | |
2010-02-04 15:47 | hgbot | Note Added: 0023959 | |
2010-02-04 15:47 | hgbot | Status | new => resolved |
2010-02-04 15:47 | hgbot | Resolution | open => fixed |
2010-02-04 15:47 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/2d7d6845bd6dd20dd955cdf4a9dc679ec08e7a99 [^] |
2010-02-10 22:24 | dbaz | Relationship added | related to 0012222 |
2010-02-15 17:36 | hudsonbot | Checkin | |
2010-02-15 17:36 | hudsonbot | Note Added: 0024292 | |
2010-02-17 12:43 | shuehner | Note Added: 0024485 | |
2010-02-17 12:43 | shuehner | Status | resolved => closed |
2010-02-17 12:43 | shuehner | Fixed in Version | => 2.50MP12 |
2010-02-18 00:00 | anonymous | sf_bug_id | 0 => |
2010-03-08 16:06 | jpabloae | Target Version | 2.50MP13 => 2.50MP14 |
2010-03-10 18:29 | anonymous | sf_bug_id | => 2968003 |
Notes |
|
|
I tested the behavior a bit:
Depending on the numbers which are added the result is not correct (but showing some 0.00000001 error or similar at the end.
Checking the code shows two code-paths:
a.)
If the selected rows are all in the datagrid's buffer (already loaded), then the calculation is done on the client side in javascript using the normal js-floating point arithmetic (which is not exact! )
b.)
if not all selected rows are in the datagrid's buffer an ajax-request to the server is made, and the backend calculates the columns' total in the database.
The case b.) should be always correct, however code-path a.) cannot be correct in general due to the usage of floating point arithmetic. |
|
|
|
Added relation to 8177, as its the same issue which was already fixed in xmlEngine.
Note that the same fix cannot be directly applied to the js parts, as afaik js only has floating point arithmetic.
One possible solution would be to always use the ajax-backend request to calculate the total. However this would add one request per use of that feature in all cases, even if all data is already present in the clients' buffer. |
|
|
|
Re-assigned to David, waiting for Scheduling. |
|
|
(0023959)
|
hgbot
|
2010-02-04 15:47
|
|
Repository: erp/devel/pi
Changeset: 2d7d6845bd6dd20dd955cdf4a9dc679ec08e7a99
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu Feb 04 15:44:50 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2d7d6845bd6dd20dd955cdf4a9dc679ec08e7a99 [^]
Fixed issue 12100: Now DataGrid numeric column sum works properly
---
M src/org/openbravo/erpCommon/security/Login_F1.html
M web/js/dojotoolkit/dojo/dojo.js
M web/js/dojotoolkit/dojo/dojo.js.uncompressed.js
M web/js/openbravo/widget/DataGrid.js
M web/js/utils.js
---
|
|
|
|
|
|
|
Tested in pi/postgres. Can't reproduce problem anymore, closing as fixed. |
|