Browse Source

Only format number if it is currency;

pull/237/head
Kat 3 years ago
parent
commit
1ebb77d9c2
  1. 2
      app/helpers/check_answers_helper.rb

2
app/helpers/check_answers_helper.rb

@ -12,7 +12,7 @@ module CheckAnswersHelper
end end
def get_answer_label(question, case_log) 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? if answer.present?
[question.prefix, answer, question.suffix].join("") [question.prefix, answer, question.suffix].join("")

Loading…
Cancel
Save