diff --git a/htdocs/telephonie/contrat/services.php b/htdocs/telephonie/contrat/services.php index 7d21808ed6f..7c7b09a3606 100644 --- a/htdocs/telephonie/contrat/services.php +++ b/htdocs/telephonie/contrat/services.php @@ -90,6 +90,14 @@ if ($cancel == $langs->trans("Cancel")) $hselected = $h; $h++; + $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/stats.php?id=".$contrat->id; + $head[$h][1] = $langs->trans("Stats"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/info.php?id=".$contrat->id; + $head[$h][1] = $langs->trans("Infos"); + $h++; + dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); print_fiche_titre('Fiche Contrat', $mesg); @@ -107,36 +115,16 @@ if ($cancel == $langs->trans("Cancel")) print $client_comm->nom.''.$client_comm->code_client; print ''; - - $client = new Societe($db, $contrat->client_id); - $client->fetch($contrat->client_id); - print 'Client (Agence/Filiale)'; - print $client->nom.'
'; - - print $client->cp . " " .$client->ville; - print ''; - - $client_facture = new Societe($db); - $client_facture->fetch($contrat->client_facture_id); - - print 'Client Facturé'; - print $client_facture->nom.'
'; - print $client_facture->cp . " " .$client_facture->ville; - - print ''; - - if ($contrat->mode_paiement == 'pre') - { - print 'RIB : '.$client_facture->display_rib(); + if ($contrat->client_comm_id <> $contrat->client_id) + { + $client = new Societe($db, $contrat->client_id); + $client->fetch($contrat->client_id); + print 'Client (Agence/Filiale)'; + print $client->nom.'
'; + print $client->cp . " " .$client->ville; + print ''; } - else - { - print 'Paiement par virement'; - } - - print ''; $commercial = new User($db, $contrat->commercial_sign_id); $commercial->fetch();