diff --git a/htdocs/telephonie/client/fiche.php b/htdocs/telephonie/client/fiche.php
index 51295facafa..a94d29b20b0 100644
--- a/htdocs/telephonie/client/fiche.php
+++ b/htdocs/telephonie/client/fiche.php
@@ -130,10 +130,38 @@ if ($_GET["id"])
print '
';
- print '
';
+ /* Commentaires */
+ $sql = "SELECT c.commentaire";
+ $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_commentaire as c";
+ $sql .= " WHERE c.fk_soc = ".$soc->id;
+ $sql .= " ORDER BY c.datec DESC LIMIT 2";
+ $resql = $db->query($sql);
+ if ($resql)
+ {
+ $num = $db->num_rows($resql);
+ if ($num > 0)
+ {
+ print '';
+ print '| 2 Derniers commentaires |
';
+ while ($obj = $db->fetch_object($resql))
+ {
+ $var=!$var;
+ print "| ";
+ print stripslashes($obj->commentaire)." | \n";
+ print "
\n";
+ }
+ print "
";
+ }
+ $db->free($resql);
+ }
+ else
+ {
+ print $db->error() . ' ' . $sql;
+ }
+
/* Contrats */
-
+ print '';
$sql = "SELECT count(l.rowid) as cc, c.rowid, c.ref, c.statut";
$sql .= ", ss.nom as agence, ss.code_client, ss.ville";
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";