feat(export.numbers): cast to float, otherwise it is implicitly casted

as string
This commit is contained in:
mfo 2024-11-14 09:12:25 +01:00
parent db053d36c9
commit 1fccf0fd18
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
2 changed files with 35 additions and 11 deletions

View file

@ -14,15 +14,12 @@ class ExportedColumn
[libelle, ExportedColumnFormatter.format(column:, champ_or_dossier:, format:), spreadsheet_architect_type]
end
# see: https://github.com/westonganger/spreadsheet_architect/blob/771e2e5558fbf6e0cb830e881a7214fa710e49c3/lib/spreadsheet_architect.rb#L39
def spreadsheet_architect_type
case @column.type
when :boolean
:boolean
when :decimal
when :decimal, :integer
:float
when :number
:integer
when :datetime
:time
when :date