Add symbol to user defined currency

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1616

    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.
  • yuri
    Member
    • Mar 2014
    • 8562

    #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
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • shalmaxb
      Senior Member
      • Mar 2015
      • 1616

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

      Comment

      • yuri
        Member
        • Mar 2014
        • 8562

        #4
        Append is only needed when you add to an array (list). Not needed when you define a key=>value object.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • shalmaxb
          Senior Member
          • Mar 2015
          • 1616

          #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...