From aaf2cca45f3488a81ffd713e148ea9c3572efaf8 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 27 Oct 2014 19:31:42 +0100 Subject: [PATCH 1/2] Fix bug n sellist extrafield filtered --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 451598a5830..228fef11d10 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -727,11 +727,11 @@ class ExtraFields if (strpos($InfoFieldList[4], 'extra')!==false) { $sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra'; - $sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4]; + $sqlwhere.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4]; } else { - $sqlwhere.= ' AND '.$InfoFieldList[4]; + $sqlwhere.= ' WHERE '.$InfoFieldList[4]; } } if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it. From bd8b393d8a8e383e6345488be2836e61d7e1004c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 5 Dec 2014 21:24:16 +0100 Subject: [PATCH 2/2] Fix [ bug #1740 ] Clone project make task date crazy --- htdocs/projet/class/task.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 4f883e1b743..68b6c867442 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1007,7 +1007,8 @@ class Task extends CommonObject $error=0; - $now=dol_now(); + //Use 00:00 of today if time is use on task. + $now=dol_mktime(0,0,0,dol_print_date(dol_now(),'%m'),dol_print_date(dol_now(),'%d'),dol_print_date(dol_now(),'%Y')); $datec = $now;