Fix #17491 : Update of fix date extrafield filter
This commit is contained in:
parent
5dcdb06e91
commit
c39dbd81b3
@ -23,9 +23,11 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
||||
|
||||
if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp')))
|
||||
{
|
||||
if ($typ == 'date'){
|
||||
$sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = DATE('".$db->idate($crit)."')";
|
||||
}else {
|
||||
if($typ == 'date'){
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$crit = dol_get_first_hour($crit);
|
||||
$sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'";
|
||||
}else{
|
||||
$sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'";
|
||||
}
|
||||
} elseif (in_array($typ, array('boolean')))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user