add thousand separators to numbers (instructors page and pdf file)

This commit is contained in:
kara Diaby 2020-02-06 16:54:38 +01:00
parent 9214476fc0
commit 805da59b99
2 changed files with 5 additions and 0 deletions

View file

@ -94,6 +94,9 @@ def render_single_champ(pdf, champ)
pdf.text " - SIRET: #{champ.to_s}"
render_identite_etablissement(pdf, champ.etablissement) if champ.etablissement.present?
pdf.text "\n"
when 'Champs::NumberChamp'
value = number_with_delimiter(champ.to_s)
format_in_2_lines(pdf, champ.libelle, value)
else
value = champ.to_s.empty? ? 'Non communiqué' : champ.to_s
format_in_2_lines(pdf, champ.libelle, value)

View file

@ -34,6 +34,8 @@
= c.to_s
- when TypeDeChamp.type_champs.fetch(:datetime)
= c.to_s
- when TypeDeChamp.type_champs.fetch(:number)
= number_with_delimiter(c.to_s)
- else
= format_text_value(c.to_s)