-
Notifications
You must be signed in to change notification settings - Fork 0
AnA09S19CurrencyManagement
Jeroen Baten edited this page Mar 9, 2018
·
1 revision
TWiki> LibrePlan Web>AnA09S19CurrencyManagement (26 Apr 2012, ManuelRego)EditAttach
Story summary | Currency Managment |
Iteration | AnA08Usability |
FEA | AnA09S19CurrencyManagement |
Story Lead | |
Next Story | |
Passed acceptance test | No |
- Modify entity Configuration to add 2 new fields:
-
currencyCode
: String (default valueEUR
). This will store the code of the configured Currency. For example:EUR
,USD
, ... -
currencySymbol
: String (default value�
). The symbol for the configured currency. For example:�
,$
, ...
- Add a new combo after Company logo URL entry with the following information:
-
Label: Currency
-
Data (alphabetically sorted):
EUR - � USD - $ ...
This combo will show as selected the currency matching with the new field currencyCode
. Once, the combo is modified and the configuration saved both fields currencyCode
and currencySymbol
will be updated.
In order to extract the list of currencies we should use the following code:
public static Map<String, String> getAllCurrencies() {
Map<String, String> currencies = new HashMap<String, String>();
for (Locale locale : Locale.getAvailableLocales()) {
if (StringUtils.isNotBlank(locale.getCountry())) {
Currency currency = Currency.getInstance(locale);
currencies.put(currency.getCurrencyCode(),
currency.getSymbol(locale));
}
}
return currencies;
}
Review all the places (reports included) where € or EUR or euro/s is used and replace it for the currencySymbol
from configuration.
Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.