Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021109Openbravo ERP09. Financial managementpublic2012-07-16 11:472012-07-27 02:18
mirurita 
mirurita 
highmajoralways
closedfixed 
20Community Appliance
pi 
pi 
Core
No
0021109: Multicurrency: exchange rate is not properly calculated using commas as decimal separator
Having commas (,) configured as decimal separator (see attached Format.xml file) the exchange rate is always retrieved with dot as decimal separator.

Reproducible on:
- Add Payment From Invoice
- Add Payment From Transaction
Scenario 1 (Add Payment From Transaction)
1) Configure Format.xml document to use comma (,) as decimal separator (use attaches Format.xml file)
2) Go to "Tarifa de ventas" price list and change the currency to USD
3) Create a new sales invoice and complete
  - BP: Alimentos y Supermercados, S.A
  - Currency: USD
  - Total: 10 USD
4) Go to "Cuenta de Banco" financial account
5) Configure Transferencia payment method to allow multicurrency transactions
  - Receive Payments in Multiple Currencies
6) Click on Add Transaction
7) Click on Add Payment In/Out
8) Select Alimentos y Supermercados, S.A
9) Select USD in currency combo
10) Realize that the Exchange Rate has an invalid format (dot as decimal separator)


Scenario 2 (Add Payment From Invoice)
1) Configure Format.xml document to use comma (,) as decimal separator (use attaches Format.xml file)
2) Go to "Tarifa de ventas" price list and change the currency to USD
3) Create a new sales invoice and complete
  - BP: Alimentos y Supermercados, S.A
  - Currency: USD
  - Total: 10 USD
4) Go to "Cuenta de Banco" financial account
5) Configure Transferencia payment method to allow multicurrency transactions
  - Receive Payments in Multiple Currencies
6) Click on Add payment on Sales Invoice window
7) Realize that the Exchange Rate is not loaded
a3196480 3301361 [TP-Processor3] ERROR org.openbravo.xmlEngine.ParameterValue - print() - Could not parse to string to BigDecimal: 0,689655
java.lang.NumberFormatException
    at java.math.BigDecimal.<init>(BigDecimal.java:470)
    at java.math.BigDecimal.<init>(BigDecimal.java:739)
No tags attached.
xml Format.xml (2,184) 2012-07-16 11:47
https://issues.openbravo.com/file_download.php?file_id=5438&type=bug
png Exchange Rate comma decimal.png (60,301) 2012-07-16 11:48
https://issues.openbravo.com/file_download.php?file_id=5439&type=bug
png

png Exchange Rate comma decimal2.png (47,831) 2012-07-16 12:09
https://issues.openbravo.com/file_download.php?file_id=5440&type=bug
png
Issue History
2012-07-16 11:47miruritaNew Issue
2012-07-16 11:47miruritaAssigned To => mirurita
2012-07-16 11:47miruritaFile Added: Format.xml
2012-07-16 11:47miruritaModules => Core
2012-07-16 11:48miruritaFile Added: Exchange Rate comma decimal.png
2012-07-16 12:07miruritaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3636#r3636
2012-07-16 12:09miruritaFile Added: Exchange Rate comma decimal2.png
2012-07-19 11:07hgbotCheckin
2012-07-19 11:07hgbotNote Added: 0050747
2012-07-19 11:07hgbotStatusnew => resolved
2012-07-19 11:07hgbotResolutionopen => fixed
2012-07-19 11:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d6afbc421ad8c6705f1394314052a20f6958d475 [^]
2012-07-26 02:42hudsonbotCheckin
2012-07-26 02:42hudsonbotNote Added: 0050859
2012-07-26 16:13hgbotCheckin
2012-07-26 16:13hgbotNote Added: 0050908
2012-07-26 16:13dmiguelezNote Added: 0050909
2012-07-26 16:13dmiguelezStatusresolved => closed
2012-07-26 16:13dmiguelezFixed in Version => pi
2012-07-27 02:18hudsonbotCheckin
2012-07-27 02:18hudsonbotNote Added: 0050922

Notes
(0050747)
hgbot   
2012-07-19 11:07   
Repository: erp/devel/pi
Changeset: d6afbc421ad8c6705f1394314052a20f6958d475
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Jul 19 11:03:08 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d6afbc421ad8c6705f1394314052a20f6958d475 [^]

Fixes issue 21109: Multicurrency: exchange rate problem with comma as dec separator

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js
---
(0050859)
hudsonbot   
2012-07-26 02:42   
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/5edf203d5780 [^]

Maturity status: Test
(0050908)
hgbot   
2012-07-26 16:13   
Repository: erp/devel/pi
Changeset: 65ba83da0c665ebc9ef11a998ecfe17e445625ae
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jul 26 16:11:11 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/65ba83da0c665ebc9ef11a998ecfe17e445625ae [^]

Related to issue 0021109: Removes code that is never reached.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
---
(0050909)
dmiguelez   
2012-07-26 16:13   
Code Review + Test OK
(0050922)
hudsonbot   
2012-07-27 02:18   
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/4cfe6f4cd84a [^]

Maturity status: Test