Skip to content

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

Tasks

Add option to choose LibrePlan currency in configuration window

  1. Modify entity Configuration to add 2 new fields:
  • currencyCode: String (default value EUR). 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: , $, ...
  1. 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;
    }

Replace use of euro for the configured currency

Review all the places (reports included) where € or EUR or euro/s is used and replace it for the currencySymbol from configuration.

User stories

Tasks in this story

Tasks Est Spent To do Risk Reviewer Developer Task Name Start Date Est End Date End Date
Task 2 2 0 Low ManuelRego ManuelRego Add option to choose LibrePlan currency in configuration window      
Task 3 3 0 Low ManuelRego ManuelRego Replace use of euro for the configured currency      

Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Clone this wiki locally