diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index d1995689c5c..d2752399025 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -719,7 +719,7 @@ if ($socidp > 0) print ''; print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; $sql .= " WHERE a.fk_soc = ".$objsoc->id; $sql .= " AND u.rowid = a.fk_user_author"; @@ -740,32 +740,32 @@ if ($socidp > 0) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->da) ) + if ($oldyear == strftime("%Y",$obj->dp) ) { print ''; } else { - print '\n"; - $oldyear = strftime("%Y",$obj->da); + print '\n"; + $oldyear = strftime("%Y",$obj->dp); } - if ($oldmonth == strftime("%Y%b",$obj->da) ) + if ($oldmonth == strftime("%Y%b",$obj->dp) ) { print ''; } else { - print '\n"; - $oldmonth = strftime("%Y%b",$obj->da); + print '\n"; + $oldmonth = strftime("%Y%b",$obj->dp); } - print '\n"; - print ''; + print '\n"; + print ''; // Picto warning print '';
'.$langs->trans("ActionsToDo").' 
|'.strftime("%Y",$obj->da)."'.strftime("%Y",$obj->dp)."|' .strftime("%b",$obj->da)."' .strftime("%b",$obj->dp)."'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da).''.strftime("%d",$obj->dp)."'.strftime("%H:%M",$obj->dp).''; - if (date("U",$obj->da) < time()) print ' '.img_warning("Late"); + if (date("U",$obj->dp) < time()) print ' '.img_warning("Late"); else print ' '; print '