Error with currency localization when recording a payment
This has been posted on stackexchange: https://civicrm.stackexchange.com/questions/26612/problem-with-incoerent-local-currency-in-contribution
I am using civicrm 5.4.1 with drupal 7. My localization is Italian with decimal delimiter , (comma) in civicrm/admin/setting/localization?reset=1
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> <input size="6" maxlength="14" name="total_amount" type="text" value="1.00" id="total_amount" class="eight six crm-form-text required" /> </span> <span class="status">Balance Owed: € 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
If I change the decimal delimiter to . (point) it works fine.
I have checked this on dmaster.demo.civicrm.org it it has the same problem.