Fix extrafield contact typed as date isn't show in the list from 'contact/address' tab of company

This commit is contained in:
atm-ph 2018-10-11 14:24:55 +02:00
parent 84605bc59b
commit 4b32c8e100

View File

@ -21,7 +21,7 @@ if (! empty($extrafieldsobjectkey)) // New method: $extrafieldsobject can be 'so
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')))
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !preg_match('/^[0-9]{10}$/', $obj->$tmpkey))
{
$value = $db->jdate($obj->$tmpkey);
}