Skip to content

Commit

Permalink
Merge pull request civicrm#9745 from jmcclelland/CRM-19937
Browse files Browse the repository at this point in the history
CRM-19937 - ensure amount preceded by $ is still treated as a number
  • Loading branch information
eileenmcnaughton authored Feb 28, 2017
2 parents f66092e + 93e2847 commit 926cfff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/CRM/Price/Form/Calculate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ function calculateSelectLineItemValue(priceElement) {
*/
function calculateText(priceElement) {
//CRM-16034 - comma acts as decimal in price set text pricing
var textval = parseFloat(cj(priceElement).val().replace(thousandMarker, ''));
//CRM-19937 - dollar sign easy mistake to make by users.
var textval = parseFloat(cj(priceElement).val().replace(thousandMarker, '').replace(symbol, ''));
if (isNaN(textval)) {
textval = parseFloat(0);
Expand Down

0 comments on commit 926cfff

Please sign in to comment.