Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018769Openbravo ERP07. Sales managementpublic2011-10-13 11:032011-10-18 17:26
maite 
dbaz 
immediatemajoralways
closedfixed 
5
 
3.0MP53.0MP5 
Core
No
0018769: Not possible to work with more than 3 decimals in Openbravo3 prices
If you configure your application to work with 7 decimals in price fields(changing Format.xml and currency precision) when selecting product in Sales Invoice line, for example, price is rounded to 3
1. Change Format.xml to set 7 decimal places in fields priceInform, priceRelation and priceEdition
2. Logged as System administrator modify Price Precision of EUR to 7
3. Compile using ant smartbuild to persist Format changes
4. Define price: 1.1234567 for any product
5. Create Sales invoice for any BP and add line for this product. Realize that price is rounded to 1.123

No tags attached.
Issue History
2011-10-13 11:03maiteNew Issue
2011-10-13 11:03maiteAssigned To => jonalegriaesarte
2011-10-13 11:03maiteModules => Core
2011-10-13 11:05jonalegriaesarteAssigned Tojonalegriaesarte => iperdomo
2011-10-13 12:14jonalegriaesarteAssigned Toiperdomo => alostale
2011-10-13 12:24alostaleAssigned Toalostale => dbaz
2011-10-13 14:09dmitry_mezentsevTarget Version => 3.0MP4
2011-10-13 15:27dbazNote Added: 0041804
2011-10-13 15:40shuehnerIssue Monitored: shuehner
2011-10-13 20:10hgbotCheckin
2011-10-13 20:10hgbotNote Added: 0041815
2011-10-13 20:10hgbotStatusnew => resolved
2011-10-13 20:10hgbotResolutionopen => fixed
2011-10-13 20:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/173a7e064616bc945a73c15521529e12d4ccbeae [^]
2011-10-13 20:18dmitry_mezentsevNote Added: 0041816
2011-10-14 10:14hgbotCheckin
2011-10-14 10:14hgbotNote Added: 0041824
2011-10-14 11:56shuehnerTarget Version3.0MP4 => 3.0MP5
2011-10-17 22:05dbazNote Added: 0041866
2011-10-17 22:05dbazStatusresolved => closed
2011-10-17 22:05dbazFixed in Version => 3.0MP5
2011-10-18 17:26hudsonbotCheckin
2011-10-18 17:26hudsonbotNote Added: 0041902
2011-10-18 17:26hudsonbotCheckin
2011-10-18 17:26hudsonbotNote Added: 0041903

Notes
(0041804)
dbaz   
2011-10-13 15:27   
The problem is in SL_Invoice_Amt.java callout executed when the focus blurs the input.

The parameter strPricePrecision used to calculate the new value, always takes '2' value, and then in

    priceActual = (!Utility.isBigDecimal(strPriceActual) ? ZERO : (new BigDecimal(strPriceActual)))
        .setScale(PricePrecision, BigDecimal.ROUND_HALF_UP);

the value is wrongly rounded
(0041815)
hgbot   
2011-10-13 20:10   
Repository: erp/devel/pi
Changeset: 173a7e064616bc945a73c15521529e12d4ccbeae
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 13 20:08:55 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/173a7e064616bc945a73c15521529e12d4ccbeae [^]

Fixed issue 18769. Several changes have been made:
- The selector fields will now include information related to number format if they are linked to a field in the form.
- In the client, this information will be used to format the values of the out fields in case it is included. If it's not included, the only formatting done will be the replacement of the decimal separator so that callouts receive the number amount correctly.
- Callouts will no longer be able to call themselves by modifying a column which is associated with the same callout.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorComponent.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/templates/selector.ftl
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0041816)
dmitry_mezentsev   
2011-10-13 20:18   
Issue is fixed but won´t be included in MP4 because it has a very risky part and needs some maturing prior it.

For the instances affected by this issue I propose to use generated by CI obx (to verify it in fields) until this fix is included into the next MP - MP5.
(0041824)
hgbot   
2011-10-14 10:14   
Repository: erp/devel/pi
Changeset: 6e4192b18a24101ec91a525fec88fea07605466e
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Oct 14 10:13:41 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6e4192b18a24101ec91a525fec88fea07605466e [^]

Related to issue 18769. Default grouping/decimal separator and grouping size will be used.

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorComponent.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/templates/selector.ftl
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0041866)
dbaz   
2011-10-17 22:05   
Solved by marvintm
Closed by me (dbaz)
(0041902)
hudsonbot   
2011-10-18 17:26   
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/3a0e09f510aa [^]

Maturity status: Test
(0041903)
hudsonbot   
2011-10-18 17:26   
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/3a0e09f510aa [^]

Maturity status: Test