Fixes #4103 - Reporting export file shows empty fields in selected columns when "custom sort option" is enabled.
This commit is contained in:
parent
62ae0e9944
commit
bb80177a02
1 changed files with 4 additions and 3 deletions
|
@ -156,10 +156,11 @@ class ExcelSheet
|
|||
record
|
||||
end
|
||||
case object[:data_type]
|
||||
when 'boolean', 'select'
|
||||
if object[:data_option] && object[:data_option]['options'] && object[:data_option]['options'][value]
|
||||
value = object[:data_option]['options'][value]
|
||||
when 'boolean', %r{^(multi|tree_)?select$}
|
||||
if object[:data_option].present? && object[:data_option]['options'].present?
|
||||
value = ObjectManager::Attribute.data_options_hash(object[:data_option]['options'])[value]
|
||||
end
|
||||
|
||||
@worksheet.write_string(@current_row, @current_column, value) if value.present?
|
||||
when 'datetime'
|
||||
@worksheet.write_date_time(@current_row, @current_column, timestamp_in_localtime(value), @format_time) if value.present?
|
||||
|
|
Loading…
Reference in a new issue