diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 85ed0afdd1f..8154da85173 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -322,12 +322,12 @@ if ($socid > 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 = ".$societe->id; $sql .= " AND u.rowid = a.fk_user_author"; $sql .= " AND c.id=a.fk_action AND a.percent < 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; + $sql .= " ORDER BY a.datep DESC, a.id DESC"; $result=$db->query($sql); if ($result) @@ -343,29 +343,29 @@ if ($socid > 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 '\n"; - if (date("U",$obj->da) < time()) + print '\n"; + print '\n"; + if (date("U",$obj->dp) < time()) { print ""; } @@ -387,7 +387,7 @@ if ($socid > 0) } else { - 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)."".img_warning("Late")."'.img_object($langs->trans("ShowAction"),"task"); + print ''.img_object($langs->trans("ShowAction"),"task"); $transcode=$langs->trans("Action".$obj->acode); $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); print $libelle;