Answers.Body: <p>Looks like the decimal delimiter present at <code>civicrm/admin/setting/localization?reset=1</code> is configured as a comma (<code>,</code>) instead of a default <code>.</code>.</p>
  
  <p>Civi might not be handling this correctly when the record payment form is loaded. The value of the total amount defaults to <code>1.0</code> instead of considering the delimiter configured for your site, i.e, <code>1,0</code>. Either this might be a bug which needs to be fixed OR you can try using the default <code>.</code> in the above settings and check if it fixes for you.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-25T10:30:14.760Z
Answers.Text: 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?
Answers.UserDisplayName: Johan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-25T10:49:03.697Z
Answers.Text: Check on http://dmaster.demo.civicrm.org/ by updating the setting to use comma. If you can replicate the behavior there too, raise a bug at https://lab.civicrm.org/dev/core/issues/new
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-25T10:49:50.607Z
Answers.Text: Or if you are a developer, you can fix and contribute a patch to https://www.github.com/civicrm/civicrm-core repo
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-25T11:01:05.597Z
Answers.Text: I have checked on dmaster.demo.civicrm.org and it has the exact same problem when I set localization to use , instead of .
Answers.UserDisplayName: Johan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-25T10:03:01.477Z
Answers.LastActivityDate: 2018-09-25T10:03:01.477Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>I have a problem after upgrading to civicrm 5.4.1 from 4.7</p>
  
  <p>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.</p>
  
  <p>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):</p>
  
  <pre><code>&lt;span id='totalAmount'&gt;
  &lt;select class="eight crm-select2 eight crm-form-select required" name="currency" id="currency"&gt;↵    
  &lt;option value="EUR" selected="selected"&gt;EUR (€)&lt;/option&gt;
  &lt;/select&gt;&amp;nbsp;&lt;input size="6" maxlength="14" name="total_amount" type="text" value="1.00" id="total_amount" class="eight six crm-form-text required" /&gt;
  &lt;/span&gt;&amp;nbsp; 
  &lt;span class="status"&gt;Balance Owed:&amp;nbsp;€ 1,00&lt;/span&gt;
  </code></pre>
  
  <p>Why is the value in total_amount 1.00 and the value showed in the Balance Owed 1,00?</p>
  
  <p>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:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>Can anyone help with some ideas?</p>
  
Tags: <drupal><contributions><ajax>
Title: Problem with incoerent local currency in contribution
ThreadText: # Problem with incoerent local currency in contribution
  
  (Asked by: username_0 on 2018-09-25)
  
  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?
  
  **Tags:** drupal, contributions, ajax
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-09-25. Score: 3 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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?  
  > **username_1**: Check on http://dmaster.demo.civicrm.org/ by updating the setting to use comma. If you can replicate the behavior there too, raise a bug at https://lab.civicrm.org/dev/core/issues/new  
  > **username_1**: Or if you are a developer, you can fix and contribute a patch to https://www.github.com/civicrm/civicrm-core repo  
  > **username_0**: I have checked on dmaster.demo.civicrm.org and it has the exact same problem when I set localization to use , instead of .  
  
  ---
  
  