From 5c4e6f1ef7fff6f2e8f5f156b24dd16f0aef2f2b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 9 Dec 2007 00:38:12 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20mauvais=20affichage=20des=20dates=20d'ac?= =?UTF-8?q?tions=20=E0=20r=E9aliser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/fiche.php | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index d29cdab89e2..90c8a330e13 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -454,7 +454,10 @@ if ($socid > 0) print ''.$langs->trans("ActionsToDoShort").' '; print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,"; + $sql = "SELECT a.id, a.label,"; + $sql.= " ".$db->pdate("a.datep")." as dp,"; + $sql.= " ".$db->pdate("a.datea")." as da,"; + $sql.= " a.percent,"; $sql.= " c.code as acode, c.libelle, u.login, a.propalrowid, a.fk_user_author, a.fk_contact,"; $sql.= " u.login, u.rowid,"; $sql.= " sp.name, sp.firstname"; @@ -480,32 +483,32 @@ if ($socid > 0) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->da) ) + if ($oldyear == strftime("%Y",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { - print ''.strftime("%Y",$obj->da)."\n"; - $oldyear = strftime("%Y",$obj->da); + print ''.strftime("%Y",$obj->dp)."\n"; + $oldyear = strftime("%Y",$obj->dp); } - if ($oldmonth == strftime("%Y%b",$obj->da) ) + if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { - print '' .strftime("%b",$obj->da)."\n"; - $oldmonth = strftime("%Y%b",$obj->da); + print '' .strftime("%b",$obj->dp)."\n"; + $oldmonth = strftime("%Y%b",$obj->dp); } - print ''.strftime("%d",$obj->da)."\n"; - print ''.strftime("%H:%M",$obj->da).''; + print ''.strftime("%d",$obj->dp)."\n"; + print ''.strftime("%H:%M",$obj->dp).''; // Picto warning print ''; - if (date("U",$obj->da) < time()) print ' '.img_warning("Late"); + if (date("U",$obj->dp) < time()) print ' '.img_warning("Late"); else print ' '; print ''; @@ -569,7 +572,10 @@ if ($socid > 0) print ''.$langs->trans("ActionsDoneShort").''; print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,"; + $sql = "SELECT a.id, a.label,"; + $sql.= " ".$db->pdate("a.datep")." as dp,"; + $sql.= " ".$db->pdate("a.datea")." as da,"; + $sql.= " a.percent,"; $sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,"; $sql.= " c.code as acode, c.libelle,"; $sql.= " u.login, u.rowid,"; @@ -596,14 +602,14 @@ if ($socid > 0) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->da) ) { + if ($oldyear == strftime("%Y",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { print ''.strftime("%Y",$obj->da)."\n"; $oldyear = strftime("%Y",$obj->da); } - if ($oldmonth == strftime("%Y%b",$obj->da) ) { + if ($oldmonth == strftime("%Y%b",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { print ''.strftime("%b",$obj->da)."\n";