Announcement

Collapse
No announcement yet.

Add symbol to user defined currency

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add symbol to user defined currency

    Hi, I created a currency and would like to know how and where I would have to insert the mapping for the symbol.
    For now I added it to the list in application/Espo/Resources/metadata/app/currency.json but I guess this would not be update safe.

  • #2
    Add it to`custom/Espo/Custom/Resources/metadata/app/currency.json`

    See: https://docs.espocrm.com/administrat...ssing-currency
    Learn how custom metadata is merged: https://docs.espocrm.com/development...how-its-stored

    Comment


    • #3
      ok, thanks, I understand, I will have to use __APPEND__ also for the array list.

      Comment


      • #4
        Append is only needed when you add to an array (list). Not needed when you define a key=>value object.

        Comment


        • #5
          With the help above I succeded to make available another currency. Here the code example to add a new currency:

          1. New currency will be the crypto Ether = ETH
          2. The used Symbol is the greek letter "chi" or "X", which is this one: Ξ

          With this information create a file custom/Espo/Custom/Resources/metadata/app/currency.json, where the currency and the symbol will be added update safe.


          Code:
          {
          "symbolMap":{
          "ETH":"Ξ"
          },
          
          "list": [
          "__APPEND__",
          "ETH"
          ]
          }
          That`s all, you now may choose this currency and its converted values. The conversion rate you can put in in the Administrator GUI. There is no automatic conversion. So for crypto, which normally is very volatil, you should find a way. I solved this by not using the default currency conversion but created one field for the conversion rate and another currency field for the calculated converted value. Calculation was made by formula.​

          Comment

          Working...
          X