From 31a1201f1538f99da0456a1fa6e07188fd003c80 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 30 Dec 2016 13:03:36 +0530 Subject: [PATCH] CRM-19800, fixed JS for parsing money field ---------------------------------------- * CRM-19800: Incorrect Amount recorded in civicrm_financial_trxn table https://issues.civicrm.org/jira/browse/CRM-19800 --- templates/CRM/Event/Form/Participant.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index 5246237f7f..1655eb5359 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -138,13 +138,13 @@ .focus( function() { feeAmount = cj(this).val(); - feeAmount = parseInt(feeAmount); + feeAmount = Number(feeAmount.replace(/[^0-9\.]+/g,"")); } ) .change( function() { userModifiedAmount = cj(this).val(); - userModifiedAmount = parseInt(userModifiedAmount); + userModifiedAmount = Number(userModifiedAmount.replace(/[^0-9\.]+/g,"")); if (userModifiedAmount < feeAmount) { cj('#status_id').val(partiallyPaidStatusId).change(); } -- 2.25.1