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.
To set a currency and the rates to convert to this currency do these steps.
In the
/var/www/html/ui/config
folder, edit theclient-config-custom.json
fileCreate 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 } ] } ] },
On the currency selector, the currencies display in the same order as the
currencyCode
properties in the config fileEnter a
symbol
for the currency, such as$
Enter a value for the
default
conversion, with themonth
value ofdefault
Add other conversions for a specific
month
, with a value from1
(for January) to12
(for December) andyear
.If your property is the last one in the file, remove the comma (
,
) from the above example
For each currency, go to the
../ui/lang
folder, edit thelang_xx_XX_custom.json
file, and add a currency label for thecurrencyCode
. For example, for Australian dollars in the language file for US English, which islang_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.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.
Save your files in
UTF-8
formatTo activate your changes, reload the UI.
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