Merge pull request #8290 from colinux/champ-commune-pdf

feat(pdf): list department with champ commune
This commit is contained in:
Colin Darie 2022-12-16 10:46:56 +01:00 committed by GitHub
commit 3f34414145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,10 @@ def add_single_champ(pdf, champ)
when 'Champs::NumberChamp'
value = champ.to_s.empty? ? 'Non communiqué' : number_with_delimiter(champ.to_s)
format_in_2_lines(pdf, tdc.libelle, value)
when 'Champs::CommuneChamp'
value = champ.to_s.empty? ? 'Non communiqué' : champ.to_s
format_in_2_lines(pdf, tdc.libelle, value)
pdf.text "Département : #{champ.departement}" if champ.departement.present?
else
value = champ.to_s.empty? ? 'Non communiqué' : champ.to_s
format_in_2_lines(pdf, tdc.libelle, value)