diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 2576873a2c5..e59f50501ab 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -25,7 +25,12 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ $tmpkey='options_'.$key; if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp'))) { - $value = $db->jdate($obj->$tmpkey); + $datenotinstring = $obj->$tmpkey; + if (! is_numeric($obj->$tmpkey)) // For backward compatibility + { + $datenotinstring = $db->jdate($datenotinstring); + } + $value = $datenotinstring; } else { diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 947479e62b3..6d3abfd84a7 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -265,6 +265,7 @@ if ($ret) if (! $i) $totalarray['nbfield']++; } // Extra fields + $obj = (Object) $resource->array_options; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; print '';