Merge pull request #17497 from Hystepik/develop_v13#2
Fix #17491 : date extrafield filter works well now
This commit is contained in:
commit
4ec763a436
@ -23,7 +23,13 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
|||||||
|
|
||||||
if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp')))
|
if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp')))
|
||||||
{
|
{
|
||||||
$sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'";
|
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')))
|
} elseif (in_array($typ, array('boolean')))
|
||||||
{
|
{
|
||||||
if ($crit !== '-1' && $crit !== '') {
|
if ($crit !== '-1' && $crit !== '') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user