Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015008Openbravo ERP07. Sales managementpublic2010-10-25 10:182010-12-21 00:00
networkb 
adrianromero 
urgentmajoralways
closedfixed 
5
2.50MP22 
2.50MP24 
Core
No
0015008: Wrong behaviour with 9 Decimals
With the Format and the Currency with 9 decimals, the number is rounded to 6 decimals

5.174174257 is rounded to 5.174174000

Reported by XME
Ticket: 9737
- Change the Format.xml:
     <Number name="priceInform"
decimal="," grouping="." formatOutput="#,##0.#########" formatInternal="#0.000000000" />
<Number name="priceRelation"
decimal="." grouping="," formatOutput="#,##0.#########" formatInternal="#0.000000000" />
<Number name="priceEdition"
decimal="." grouping="," formatOutput="#0.000000000" formatInternal="#0.000000000" />

- As System Administrator go to General Setup || Application || Currency
- Select EUR. Standar, Costing and Price Precision: 9

- As Openbravo Admin go to Procurement Management || Transactions || Purchase Invoice
- Create a new one and go to lines.
- Select hammer.
- Net Unit Price: 5.174174257
- Save
- Realize that the number is rounded to 5.174174000

No tags attached.
related to defect 0032951 closed alostale Fix Stock process rounds the quantities to 6 decimals and it should not 
Issue History
2010-10-25 10:18networkbNew Issue
2010-10-25 10:18networkbAssigned To => adrianromero
2010-11-02 18:09hgbotCheckin
2010-11-02 18:09hgbotNote Added: 0032358
2010-11-02 18:09hgbotStatusnew => resolved
2010-11-02 18:09hgbotResolutionopen => fixed
2010-11-02 18:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6fbfcf8888d6210fac541d358c97e2d8e97c149f [^]
2010-11-02 18:15adrianromeroNote Added: 0032359
2010-11-05 12:45hudsonbotCheckin
2010-11-05 12:45hudsonbotNote Added: 0032448
2010-12-20 11:16psarobeNote Added: 0033278
2010-12-20 11:16psarobeStatusresolved => closed
2010-12-21 00:00anonymoussf_bug_id0 => 3141000
2016-05-25 11:03alostaleRelationship addedrelated to 0032951

Notes
(0032358)
hgbot   
2010-11-02 18:09   
Repository: erp/devel/pi
Changeset: 6fbfcf8888d6210fac541d358c97e2d8e97c149f
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Nov 02 18:08:06 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6fbfcf8888d6210fac541d358c97e2d8e97c149f [^]

Fixes issue 0015008: Wrong behaviour with 9 Decimals
It has been modified the TO_NUMBER function to accept up to 10 decimals instead of 6 decimals

---
M src-db/database/model/prescript-PostgreSql.sql
---
(0032359)
adrianromero   
2010-11-02 18:15   
* Testing the issue

Just follow the steps to reproduce and notice that now the price is not rounded

* Other areas affected

It has been modified the function TO_NUMBER in posgresql to accept up to 10 decimals. This is a very horizontal change because the TO_NUMBER function is used in all the application. But this change is very small and the only expected behavior is now that the TO_NUMBER function will accept more decimals. In Oracle the behavior has not been modified because the TO_NUMBER function is a built-in function that works as expected.
(0032448)
hudsonbot   
2010-11-05 12:45   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/6fbfcf8888d6 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f2cf138fa03c [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18797.obx [^]
(0033278)
psarobe   
2010-12-20 11:16   
Tested working fine