Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2017-02-22 10:552017-03-15 20:20
ReportermaiteView Statuspublic 
Assigned Toinigosanchez 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revisione7630e80f729
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
Regression levelProduction - QA Approved
Regression date2016-09-08
Regression introduced in release3.0PR16Q4
Regression introduced by commit [^]
Triggers an Emergency PackNo

0035334: Callout problem when working with comma (,) as decimal separator

DescriptionCallout calculations are wrong when Format.xml is configured with comma (,) as decimal separator
Steps To Reproduce1. Edit config/Format.xml file to set comma as decimal separator for all references
2. Compile application using: ant smartbuild
3. Register new Sales Invoice record for "EspaƱa" org and any BP. Add any line
4. Access to "Exchange Rate" tab, create new record setting USD, set "Foreign Amount"= 5 and realize that "Rate" field has not been properly calculated

Problem is also reproducible in Financial Account window, Transactions tab:
0. Access Financial Account window, Payment Method tab and modify Transferencia to leave it as "Automatic Deposit"=NO
1. Access Payment In window, set "Alimentos y Supermercados, S.A" and any decimal amount
2. Run "Add details" process and pay pending invoice with already set amount, Select "Process payment" option
3. Access Transactions tab in financial account "cuenta de banco", create new record. select previously created payment in "payment" selector and realize that Deposit Amount is not correct
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035213 closedinigosanchez Callout problem when working with comma (,) as decimal separator for euro references defined in format.xml 
depends on backport 00353493.0PR17Q1 closedinigosanchez Callout problem when working with comma (,) as decimal separator 
depends on backport 00353503.0PR16Q4.3 closedinigosanchez Callout problem when working with comma (,) as decimal separator 
caused by design defect 00323663.0PR16Q4 closedinigosanchez callout invocation ineficiencies 

-  Notes
inigosanchez (developer)
2017-02-23 17:01

Added Test suite in TestLink > Platform > Format > [SSC] Separators & SimpleCallouts.
hgbot (developer)
2017-02-27 10:42

Repository: erp/devel/pi
Changeset: e7630e80f729dd6a8740250bae5ab6769f0780b0
Author: Inigo Sanchez <inigo.sanchez <at>>
Date: Mon Feb 27 10:40:30 2017 +0100
URL: [^]

Fixed issue 35334:Callout problem when working with comma as decimal separator

The problem was raised when a default format were switched, it means, when
decimal and group separator were switched. In this situation, when
SimpleCalloutInformationProvider class was used to obtain the current element
value and this current element was a BigDecimal, the format was not managed
properly. This occurred because getCurrentElementValue method always retrieved
a String element instead of Object element, in tyhis case BigDecimal.

In this situation, managesUpdatedValuesForCallout method of FIC class compare
if element is a String or not. If a BigDecimal is retrieved as String element,
in this part of the code the format is not managed properly when decimal separator
is comma. The code manage the comma separator as group separator and removed it.

When the decimal separator is dot (.) the format is managed as expected although
this method retrieves a String object (e.g. "1.23"). When decimal separator is
comma (,) this BigDecimal (e.g. 1,24) is retrieved by getCurrentElementValue method
as String value and the format is missed.

This problem has been fixed by take into account type of current element inside
getCurrentElementValue method. Now this method retrieves an object value. In this
case, a BigDecimal is retrieved. Now the format is managed properly.

M src/org/openbravo/erpCommon/ad_callouts/
inigosanchez (developer)
2017-02-27 13:44

Added automated tests in pi-smoke-platform: [^]
caristu (developer)
2017-03-03 15:33

Code reviewed + tested OK in pi@e349ce84e231
hudsonbot (developer)
2017-03-15 20:20

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-02-22 10:55 maite New Issue
2017-02-22 10:55 maite Assigned To => platform
2017-02-22 10:55 maite Modules => Core
2017-02-22 10:55 maite Resolution time => 1488150000
2017-02-22 10:55 maite Triggers an Emergency Pack => No
2017-02-22 10:55 maite Relationship added related to 0035213
2017-02-22 10:55 maite Issue Monitored: networkb
2017-02-22 10:56 jfrances Issue Monitored: jfrances
2017-02-22 11:18 inigosanchez Status new => scheduled
2017-02-22 11:18 inigosanchez Assigned To platform => inigosanchez
2017-02-23 16:13 inigosanchez Relationship added caused by 0032366
2017-02-23 16:16 inigosanchez Regression level => Packaging and release
2017-02-23 16:16 inigosanchez Regression date => 2016-09-08
2017-02-23 16:16 inigosanchez Regression introduced in release => 3.0PR16Q4
2017-02-23 16:16 inigosanchez Regression introduced by commit => [^]
2017-02-23 16:19 inigosanchez Status scheduled => acknowledged
2017-02-23 16:20 inigosanchez Status acknowledged => scheduled
2017-02-23 16:25 inigosanchez Regression level Packaging and release => Production - QA Approved
2017-02-23 17:01 inigosanchez Note Added: 0094579
2017-02-27 10:42 hgbot Checkin
2017-02-27 10:42 hgbot Note Added: 0094626
2017-02-27 10:42 hgbot Status scheduled => resolved
2017-02-27 10:42 hgbot Resolution open => fixed
2017-02-27 10:42 hgbot Fixed in SCM revision => [^]
2017-02-27 11:29 inigosanchez Review Assigned To => caristu
2017-02-27 13:44 inigosanchez Note Added: 0094640
2017-03-03 15:33 caristu Note Added: 0094750
2017-03-03 15:33 caristu Status resolved => closed
2017-03-03 15:33 caristu Fixed in Version => 3.0PR17Q2
2017-03-15 20:20 hudsonbot Checkin
2017-03-15 20:20 hudsonbot Note Added: 0095236

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker