Skip to content

Commit

Permalink
Fixed issue #6859: Integer values displayed as floating point numbers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Shnoulle committed Nov 20, 2012
1 parent 4ca36da commit be6e85b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions application/helpers/common_helper.php
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit be6e85b

Please sign in to comment.