From b1525e9703312c25cc41826b0fcfb2b759f9bbad Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Sun, 6 Oct 2013 16:08:57 +0100 Subject: [PATCH] CRM-13491 - add rounding to javascript values ---------------------------------------- * CRM-13491: Cannot create contributions using a priceset for certain dollar amounts. http://issues.civicrm.org/jira/browse/CRM-13491 --- templates/CRM/Price/Form/Calculate.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/CRM/Price/Form/Calculate.tpl b/templates/CRM/Price/Form/Calculate.tpl index 1d76c20876..dd7428d100 100644 --- a/templates/CRM/Price/Form/Calculate.tpl +++ b/templates/CRM/Price/Form/Calculate.tpl @@ -200,6 +200,9 @@ function calculateText( object ) { //display calculated amount function display( totalfee ) { + // totalfee is monetary, round it to 2 decimal points so it can + // go as a float - CRM-13491 + totalfee = Math.round(totalfee*100)/100; var totalEventFee = formatMoney( totalfee, 2, seperator, thousandMarker); document.getElementById('pricevalue').innerHTML = ""+symbol+" "+totalEventFee; scriptfee = totalfee; -- 2.25.1