Skip to content

Commit

Permalink
Fixed issue #9507: Admin GUI: Decimal format in answers pdf export ev…
Browse files Browse the repository at this point in the history
…en for 'only intenger' numeric questions

Dev: Removing 0s from answers of every numerical question
  • Loading branch information
Aestu committed Feb 10, 2015
1 parent 98e9ecc commit 3b1ae46
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions application/helpers/admin/export/PdfWriter.php
Expand Up @@ -70,8 +70,7 @@ public function outputRecord($headers, $values, FormattingOptions $oOptions)
{
if (isset($values[$question['index']]) && isset($headers[$question['index']]))
{
$qidattributes = getQuestionAttributeValues($question['qid']);
if (isset($qidattributes['num_value_int_only']) && trim($qidattributes['num_value_int_only']) == "1")
if ($question['type'] == 'N' || $question['type'] == 'K')
{
$sAuxValue=number_format(floatval($values[$question['index']]), 0, '', '');
$this->pdf->addAnswer($headers[$question['index']], $sAuxValue, false);
Expand Down

0 comments on commit 3b1ae46

Please sign in to comment.