Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035349 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | major | always | 2017-02-22 10:55 | 2017-03-03 15:35 | |||
Reporter | maite | View Status | public | |||||
Assigned To | inigosanchez | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | d2f5d812ddda | ||||
Projection | none | ETA | none | Target Version | 3.0PR17Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | Production - QA Approved | |||||||
Regression date | 2016-09-08 | |||||||
Regression introduced in release | 3.0PR16Q4 | |||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/b4a8ad7a445ff946888867836f3c3c80cb988f2a [^] | |||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035349: Callout problem when working with comma (,) as decimal separator | |||||||
Description | Callout calculations are wrong when Format.xml is configured with comma (,) as decimal separator | |||||||
Steps To Reproduce | 1. 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 | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0094628) hgbot (developer) 2017-02-27 10:47 |
Repository: erp/backports/3.0PR17Q1 Changeset: d2f5d812ddda1d676d77bf31eedfd50ec7eb4550 Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com> Date: Mon Feb 27 10:46:35 2017 +0100 URL: http://code.openbravo.com/erp/backports/3.0PR17Q1/rev/d2f5d812ddda1d676d77bf31eedfd50ec7eb4550 [^] Fixed issue 35349: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/SimpleCalloutInformationProvider.java --- |
(0094751) caristu (developer) 2017-03-03 15:35 |
Code reviewed + tested OK. |
Issue History | |||
Date Modified | Username | Field | Change |
2017-02-23 16:20 | inigosanchez | Type | defect => backport |
2017-02-23 16:20 | inigosanchez | Target Version | => 3.0PR17Q1 |
2017-02-27 10:44 | inigosanchez | Regression level | Packaging and release => Production - QA Approved |
2017-02-27 10:47 | hgbot | Checkin | |
2017-02-27 10:47 | hgbot | Note Added: 0094628 | |
2017-02-27 10:47 | hgbot | Status | scheduled => resolved |
2017-02-27 10:47 | hgbot | Resolution | open => fixed |
2017-02-27 10:47 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR17Q1/rev/d2f5d812ddda1d676d77bf31eedfd50ec7eb4550 [^] |
2017-02-27 11:29 | inigosanchez | Review Assigned To | => caristu |
2017-03-03 15:35 | caristu | Note Added: 0094751 | |
2017-03-03 15:35 | caristu | Status | resolved => closed |
2017-03-03 15:35 | caristu | Fixed in Version | => 3.0PR17Q1 |
Copyright © 2000 - 2009 MantisBT Group |