From 1ebb77d9c2b373b4e38067be40a1d33122a503c0 Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 21 Jan 2022 10:19:13 +0000 Subject: [PATCH] Only format number if it is currency; --- app/helpers/check_answers_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index eca34fc95..6797b00af 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -12,7 +12,7 @@ module CheckAnswersHelper end def get_answer_label(question, case_log) - answer = ActionController::Base.helpers.number_to_currency(question.answer_label(case_log), delimiter: ",", format: "%n") + answer = question.prefix == "£" ? ActionController::Base.helpers.number_to_currency(question.answer_label(case_log), delimiter: ",", format: "%n") : question.answer_label(case_log) if answer.present? [question.prefix, answer, question.suffix].join("")