Configure billing dashboard currency conversions

This page describes how to add currencies and set rates for the platform to convert between them to the last bills widget on the dashboard.

To add currencies to the platform, create them in pricing view

 

The user can select currencies from the pulldown menu at the top right of a widget.

Last bills with currency selector
Last bills with currency selector

To set a currency and the rates to convert to this currency do these steps.

  1. In the /var/www/html/ui/config folder, edit the client-config-custom.json file 

  2. Create the client.dashboard.widgets.lastbills.currenciesconversions UI property.
    You can copy this example that will add a conversion to Australian dollars from Euros. The platform will do this calculation:
    inner value (EUR) * conversion rate = outer value (AUD).

    client.dashboard.widgets.lastbills.currenciesconversions: { "currencyCode": "AUD", "symbol": "$", "conversions": [ { "currencyCode": "EUR", "values": [ { "month": "default", "value": 1.6 }, { "month": 12, "year": 2019, "value": 1.4 } ] } ] },
    1. On the currency selector, the currencies display in the same order as the currencyCode properties in the config file

    2. Enter a symbol for the currency, such as $

    3. Enter a value for the default conversion, with the month value of default

    4. Add other conversions for a specific month, with a value from 1 (for January) to 12 (for December) and year.

    5. If your property is the last one in the file, remove the comma (,) from the above example

  3. For each currency, go to the ../ui/lang folder, edit the lang_xx_XX_custom.json file, and add a currency label for the currencyCode. For example, for Australian dollars in the language file for US English, which is lang_en_US_custom.json, add the following label.

    "dashboard.lastbills.label.currency.AUD":"Aust. Dollar",

    Remember that the labels files must always end with the __EOF label.

  4. Check all your JSON files as always because the UI will not load with an invalid configuration. Check there are no commas after the last entry in the file, and that there are no missing commas between entries.

  5. Save your files in UTF-8 format

  6. To activate your changes, reload the UI. 

  7. The platform will automatically load the new configuration, but users should delete the cache and reload the UI in their browsers.

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved