1

I have a problem after upgrading to civicrm 5.4.1 from 4.7

When I confirm the record of a payment for a contribution the operation goes on forever and I have to exit the page although when I enter the contribution again the payment is registered.

When I look into the ajax requests with the Chrome DevTools I see that when the "record a new payment" popup is loaded it loads this script from the server (extract):

<span id='totalAmount'>
<select class="eight crm-select2 eight crm-form-select required" name="currency" id="currency">↵    
<option value="EUR" selected="selected">EUR (€)</option>
</select>&nbsp;<input size="6" maxlength="14" name="total_amount" type="text" value="1.00" id="total_amount" class="eight six crm-form-text required" />
</span>&nbsp; 
<span class="status">Balance Owed:&nbsp;€ 1,00</span>

Why is the value in total_amount 1.00 and the value showed in the Balance Owed 1,00?

When I confirm and register the payment the loading of the page goes on forever and when I look into the DevTools I see that this happens as the ajax request answers with an error:

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. amount is not a valid amount: 1.00

Can anyone help with some ideas?

3

Looks like the decimal delimiter present at civicrm/admin/setting/localization?reset=1 is configured as a comma (,) instead of a default ..

Civi might not be handling this correctly when the record payment form is loaded. The value of the total amount defaults to 1.0 instead of considering the delimiter configured for your site, i.e, 1,0. Either this might be a bug which needs to be fixed OR you can try using the default . in the above settings and check if it fixes for you.

  • Yes. Changing the decimal delimiter to . in civicrm/admin/setting/localization?reset=1 resolves the problem. But in my country (Italy) we use comma, not point for decimal numbers, and the people using civicrm want's to insert amounts with a comma. How can I resolv both? – Johan Sep 25 '18 at 10:30
  • Check on dmaster.demo.civicrm.org by updating the setting to use comma. If you can replicate the behavior there too, raise a bug at lab.civicrm.org/dev/core/issues/new – jitendra - fuzion Sep 25 '18 at 10:49
  • Or if you are a developer, you can fix and contribute a patch to github.com/civicrm/civicrm-core repo – jitendra - fuzion Sep 25 '18 at 10:49
  • I have checked on dmaster.demo.civicrm.org and it has the exact same problem when I set localization to use , instead of . – Johan Sep 25 '18 at 11:01

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.