From ece7e365e9246624735ce4f14b4444e948b63651 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 Apr 2005 16:00:56 +0000 Subject: [PATCH] =?UTF-8?q?Trad:=20Traduction=20des=20statuts=20de=20prosp?= =?UTF-8?q?ect=20et=20des=20libell=E9s=20des=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/index.php | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 42970c0bfff..31451fba547 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -245,22 +245,28 @@ if ($socidp) } $sql .= " ORDER BY a.datea DESC limit 5"; -if ( $db->query($sql) ) +$resql=$db->query($sql); +if ($resql) { - $num = $db->num_rows(); + $num = $db->num_rows($resql); print ''; print ''; $var = true; $i = 0; - while ($i < $num ) + while ($i < $num) { - $obj = $db->fetch_object(); + $obj = $db->fetch_object($resql); $var=!$var; print ""; - print "'; + print "'; + print ""; print ''; $i++; @@ -269,7 +275,7 @@ if ( $db->query($sql) ) // TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration" print "
'.$langs->trans("LastDoneTasks").'
id\">".img_object($langs->trans("ShowTask"),"task").' '.$obj->libelle.' '.$obj->label.'id\">".img_object($langs->trans("ShowTask"),"task"); + $transcode=$langs->trans("Action".$obj->code); + $libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle); + print $libelle; + print '".dolibarr_print_date($obj->da)."'.img_object($langs->trans("ShowCustomer"),"company").' '.$obj->sname.'

"; - $db->free(); + $db->free($resql); } else { @@ -282,7 +288,7 @@ else * */ -$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, a.fk_user_author, s.nom as sname, s.idp"; +$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code, c.libelle, a.fk_user_author, s.nom as sname, s.idp"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE c.id=a.fk_action AND a.percent < 100 AND s.idp = a.fk_soc"; if ($socidp) @@ -291,9 +297,10 @@ if ($socidp) } $sql .= " ORDER BY a.datea ASC"; -if ( $db->query($sql) ) +$resql=$db->query($sql); +if ($resql) { - $num = $db->num_rows(); + $num = $db->num_rows($resql); if ($num > 0) { print ''; @@ -301,13 +308,17 @@ if ( $db->query($sql) ) $var = true; $i = 0; - while ($i < $num ) + while ($i < $num) { - $obj = $db->fetch_object(); + $obj = $db->fetch_object($resql); $var=!$var; print ""; - print "'; + print "'; print '
id\">".img_object($langs->trans("ShowTask"),"task").' '.$obj->libelle.' '.$obj->label.'id\">".img_object($langs->trans("ShowTask"),"task"); + $transcode=$langs->trans("Action".$obj->code); + $libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle); + print $libelle; + print ''. dolibarr_print_date($obj->da); if (date("U",$obj->da) < time()) @@ -323,7 +334,7 @@ if ( $db->query($sql) ) // TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration" print "

"; } - $db->free(); + $db->free($resql); } else {