From ffc90c452853c7990fd784cbeb33b7c7fd5c026e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 13 Apr 2005 14:14:01 +0000 Subject: [PATCH] Affichage du fournisseur dans l'historique --- htdocs/telephonie/ligne/history.php | 41 +++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/htdocs/telephonie/ligne/history.php b/htdocs/telephonie/ligne/history.php index da0e2784930..30a6c9bccdb 100644 --- a/htdocs/telephonie/ligne/history.php +++ b/htdocs/telephonie/ligne/history.php @@ -87,7 +87,7 @@ if ($cancel == $langs->trans("Cancel")) print ''; - print ''; + print ''; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); @@ -95,18 +95,18 @@ if ($cancel == $langs->trans("Cancel")) $client_comm = new Societe($db, $ligne->client_comm_id); $client_comm->fetch($ligne->client_comm_id); - print ''; - print ''; if ($ligne->user_creat) { - print ''; print ''; print ''; + print ''; print ''; print ''; /* historique */ - - $sql = "SELECT ".$db->pdate("l.tms").", l.statut, l.fk_user, u.name, u.firstname, l.comment"; + $ff = array(); + $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."telephonie_fournisseur"; + $sql .= " WHERE commande_active = 1 ORDER BY nom "; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + if ( $num > 0 ) + { + $i = 0; + while ($i < $num) + { + $row = $db->fetch_row($resql); + $ff[$row[0]] = $row[1]; + $i++; + } + } + $db->free($resql); + } + + $sql = "SELECT ".$db->pdate("l.tms").", l.statut, l.fk_user"; + $sql .= ", u.name, u.firstname, l.comment, l.fk_fournisseur"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne_statut as l"; $sql .= ",".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.rowid = l.fk_user AND l.fk_ligne = ".$ligne->id; @@ -149,7 +171,6 @@ if ($cancel == $langs->trans("Cancel")) $row = $db->fetch_row($i); print ''; - print '"; $i++; }
Numéro'.dolibarr_print_phone($ligne->numero).'
Numéro'.dolibarr_print_phone($ligne->numero).'
Client'; + print '
Client'; print ''; print $client_comm->nom.'
Statut actuel'; + print '
Statut actuel'; print ' '; print $ligne->statuts[$ligne->statut]; print '
Créé par'; + print '
Créé par'; $cuser = new User($db, $ligne->user_creat); $cuser->fetch(); @@ -116,7 +116,7 @@ if ($cancel == $langs->trans("Cancel")) } if ($ligne->user_commande) { - print '
Commandé par'; + print '
Commandé par'; $couser = new User($db, $ligne->user_commande); $couser->fetch(); @@ -128,12 +128,34 @@ if ($cancel == $langs->trans("Cancel")) print '
DateStatutFournisseurRapporteur
'.strftime("%a %d %B %Y %H:%M:%S",$row[0]).' '; print $ligne->statuts[$row[1]]; if ($row[5]) @@ -157,6 +178,10 @@ if ($cancel == $langs->trans("Cancel")) print '
'.$row[5]; } + print '
'; + + print $ff[$row[6]]; + print ''.$row[4] . " " . $row[3] . "