From ccbf22d29a6f3ac984644cd1cfee0f5a4517dd4f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 18 Apr 2006 17:04:56 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20utilisation=20du=20champ=20"date=20effec?= =?UTF-8?q?tu=E9"=20au=20lieu=20de=20"date=20pr=E9vue"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/fiche.php | 2 +- htdocs/fourn/fiche.php | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index d2752399025..28fb6c57fac 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -724,7 +724,7 @@ if ($socidp > 0) $sql .= " WHERE a.fk_soc = ".$objsoc->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) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 31ff0b51574..ff5c14ec54d 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -362,12 +362,12 @@ if ( $societe->fetch($socid) ) 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) @@ -383,32 +383,32 @@ if ( $societe->fetch($socid) ) $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 '