Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023758Openbravo ERPA. Platformpublic2013-05-07 15:392013-06-20 02:07
jonalegriaesarte 
shankarb 
normalmajorhave not tried
closedfixed 
5
pi 
3.0MP243.0MP24 
shankarb
Core
No
0023758: Format.xml is not correctly applied to Amount reference in grid view
Format.xml is not correctly applied to Amount reference in grid view. After saving the amount, the grid view show the amount correctly rounded, but in the database, the amount is not rounded.
We are going to use an existing window to the example:

- As System Administrator, Windows, tabs and fields, Purchase invoice window. Flag the tab accounting dimension as active and change the pattern to standard.
- Purchase invoice, create a new one with one line
- In grid view, add a line in accounting dimension tab, with amount 1.3254.
- After saving the system shows 1.32, but the amount stored is 1.3254

With Price reference, the amount stored is correctly rounded.
No tags attached.
related to defect 0026538pi closed rafaroda Purchase invoice can not be booked when using 4 decimals in price list precision under some conditions 
blocks defect 00284273.0PR15Q2 closed AugustoMauch Price is not rounded to calculate the line net amount in Create Lines process of Purchase Order 
Issue History
2013-05-07 15:39jonalegriaesarteNew Issue
2013-05-07 15:39jonalegriaesarteAssigned To => AugustoMauch
2013-05-07 15:39jonalegriaesarteModules => Core
2013-05-07 15:39jonalegriaesarteTriggers an Emergency Pack => No
2013-05-13 11:16shankarbNote Added: 0058584
2013-05-13 11:16shankarbAssigned ToAugustoMauch => jonalegriaesarte
2013-05-13 11:16shankarbStatusnew => feedback
2013-05-14 06:10shankarbNote Added: 0058626
2013-05-14 06:10shankarbStatusfeedback => new
2013-05-14 06:10shankarbAssigned Tojonalegriaesarte => shankarb
2013-05-16 15:47AugustoMauchIssue Monitored: shankarb
2013-05-16 15:47AugustoMauchReview Assigned To => shankarb
2013-05-16 15:48hgbotCheckin
2013-05-16 15:48hgbotNote Added: 0058673
2013-05-16 15:48hgbotStatusnew => resolved
2013-05-16 15:48hgbotResolutionopen => fixed
2013-05-16 15:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2e4eccaa3cc8fc8ac434cb0d386166558d1ee686 [^]
2013-05-21 06:11shankarbNote Added: 0058710
2013-05-21 06:11shankarbStatusresolved => closed
2013-05-21 06:11shankarbFixed in Version => 3.0MP24
2013-05-21 17:31hgbotCheckin
2013-05-21 17:31hgbotNote Added: 0058733
2013-05-23 01:33hudsonbotCheckin
2013-05-23 01:33hudsonbotNote Added: 0058822
2013-05-23 01:34hudsonbotCheckin
2013-05-23 01:34hudsonbotNote Added: 0058847
2013-06-04 10:21hgbotCheckin
2013-06-04 10:21hgbotNote Added: 0059143
2013-06-20 02:07hudsonbotCheckin
2013-06-20 02:07hudsonbotNote Added: 0059537
2014-05-13 13:24jonalegriaesarteRelationship addedrelated to 0026538
2015-01-23 14:49AugustoMauchRelationship addedblocks 0028427

Notes
(0058584)
shankarb   
2013-05-13 11:16   
The description of the reference states that an amount is a number with 4 decimals. So I think in the database it is stored properly and it is represented in the UI using the format specified in Format.xml.
(0058626)
shankarb   
2013-05-14 06:10   
The reference is to be modified to save the numeric value based on the format provided in format.xml
(0058673)
hgbot   
2013-05-16 15:48   
Repository: erp/devel/pi
Changeset: 2e4eccaa3cc8fc8ac434cb0d386166558d1ee686
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 16 15:46:10 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2e4eccaa3cc8fc8ac434cb0d386166558d1ee686 [^]

Fixes issue 23758: Amount and price columns are properly rounded

When a numeric field loses the focus its value is going to be rounded using the number of decimal digits specified in its type instance. Then in the saveEditedValues of ob-view-grid, th
e new values are going to be recomputed to make sure the updated values are being retrieved.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0058710)
shankarb   
2013-05-21 06:11   
Code reviewed and verified in pi changeset 83655f9606f4
(0058733)
hgbot   
2013-05-21 17:31   
Repository: erp/devel/pi
Changeset: 527073d212bce78ff1016d3d25e67008d95bd266
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 21 17:30:46 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/527073d212bce78ff1016d3d25e67008d95bd266 [^]

Fixes issue 23868: Numeric columns are not stored as strings

In the fix of the issue 23758, after rounding the number they were being stored as strings when they should have been stored as numbers.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
---
(0058822)
hudsonbot   
2013-05-23 01:33   
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/97c7f6256af7 [^]

Maturity status: Test
(0058847)
hudsonbot   
2013-05-23 01:34   
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/97c7f6256af7 [^]

Maturity status: Test
(0059143)
hgbot   
2013-06-04 10:21   
Repository: erp/devel/pi
Changeset: e13f1255ac95c3444919326fc896ffdebc66c1a3
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 04 10:20:19 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e13f1255ac95c3444919326fc896ffdebc66c1a3 [^]

Fixes issue 23975: Number handling works using ',' as decimal separator

In the fix of the issue 23758 [1] it was wrongly assumed that the function getValue() of a OBNumberItem was going to return a javascript number. When the an existing record has just been opened getValue() will return a number, but when the user edits it, it will return the string representation of the number using the format specified by the user.

Now this has been taken into account, so the value is treated differently if getValue returns a string or a javascript number.

[1] https://code.openbravo.com/erp/devel/pi/rev/2e4eccaa3cc8fc8ac434cb0d386166558d1ee686 [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
---
(0059537)
hudsonbot   
2013-06-20 02:07   
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/5caf871044ad [^]

Maturity status: Test