4

In my installation, under admin/setting/localization, I have enabled multiple currencies. The default is $. The monetary amount display is %c %a.

If I create a new contribution page in CiviCRM, I can choose a currency for that page. I've chosen €. Regardless of the setting, it displays $ in the contribution page edit form, but on the preview and live links in CiviCRM, it shows €.

If I create a webform to use that contribution page, the contribution amount widget shows $. Also, in the webform output, the #wf-crm-billing-items table shows the amount in dollars, see below.

I haven't tested, but I expect it will actually charge € from the webform. I also want it to display €.

I have cleared all sort of caches. Is there a setting I am missing or is this a bug ?

enter image description here


PS - interesting little snippet I can do in the console on that page :

CRM.formatMoney(9.99)
"$ 9.99"
CRM.formatMoney('init', false, '€1,234.56');
undefined
CRM.formatMoney(9.99)
"€9.99"
  • .. or is there a way to disable the line items box ? – commonpike Mar 30 '17 at 12:59
0

So that you can actually do

   <script>
    jQuery(document).on('ready',function() {
      CRM.formatMoney('init', false, 'RM1,234.56');
      jQuery('tr[data-amount]').each(function(){
         var $this = jQuery(this);
         var amount = $this.data('amount');
         $this.children('td').eq(1).text(CRM.formatMoney(amount)); 
      });
    });
    </script>

But, not accepting that as an answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.