From be6e85bce397fc98114e9d5505e27c8bfc41b6a3 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Tue, 20 Nov 2012 10:25:21 +0100 Subject: [PATCH] Fixed issue #6859: Integer values displayed as floating point numbers Fixed issue: Can add dot on integer only numerci question type Dev: remove all ending 0 to numeric question type, and remove the . if it's at ending Dev: TODO : move control of numeric/integer in clean external js --- application/helpers/common_helper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/helpers/common_helper.php b/application/helpers/common_helper.php index badc53ee8cf..74f6d58dd74 100644 --- a/application/helpers/common_helper.php +++ b/application/helpers/common_helper.php @@ -1718,7 +1718,6 @@ function getSIDGIDQIDAIDType($fieldcode) } /** -* * @param type $iSurveyID The Survey ID * @param type $sFieldCode Field code of the particular field * @param type $sValue The stored response value @@ -1753,11 +1752,11 @@ function getExtendedAnswer($iSurveyID, $sFieldCode, $sValue, $oLanguage) case 'N': if (trim($sValue)!='') { + $sValue=rtrim($sValue,"0."); $qidattributes = getQuestionAttributeValues($fields['qid']); if($qidattributes['num_value_int_only']) { $sValue=number_format($sValue, 0, '', ''); - } } break;