[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?PHP 2 /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: info.php,v 1.5 2005/09/07 07:50:53 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/contrat/info.php,v $ 20 * 21 */ 22 23 require "./pre.inc.php"; 24 require_once DOL_DOCUMENT_ROOT."/lib/dolibarrmail.class.php"; 25 26 $mesg = ''; 27 28 llxHeader("","","Fiche Contrat"); 29 30 if ($_GET["id"]) 31 { 32 $client_comm = new Societe($db); 33 $contrat = new TelephonieContrat($db); 34 35 if ($contrat->fetch($_GET["id"]) > 0) 36 { 37 $result = 1; 38 $client_comm->fetch($contrat->client_comm_id, $user); 39 } 40 else 41 { 42 print "Erreur"; 43 } 44 45 if (!$client_comm->perm_read) 46 { 47 print "Lecture non authorisée"; 48 } 49 50 if ( $result && $client_comm->perm_read) 51 { 52 if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') 53 { 54 55 $h=0; 56 $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/fiche.php?id=".$contrat->id; 57 $head[$h][1] = $langs->trans("Contrat"); 58 $h++; 59 60 $nser = $contrat->count_associated_services(); 61 62 $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/services.php?id=".$contrat->id; 63 if ($nser > 0) 64 { 65 $head[$h][1] = $langs->trans("Services")." (".$nser.")"; 66 } 67 else 68 { 69 $head[$h][1] = $langs->trans("Services"); 70 } 71 $h++; 72 73 $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/stats.php?id=".$contrat->id; 74 $head[$h][1] = $langs->trans("Stats"); 75 $h++; 76 77 $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/info.php?id=".$contrat->id; 78 $head[$h][1] = $langs->trans("Infos"); 79 $hselected = $h; 80 $h++; 81 82 dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); 83 84 print_fiche_titre('Fiche Contrat', $mesg); 85 86 print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; 87 88 $client_comm = new Societe($db, $contrat->client_comm_id); 89 $client_comm->fetch($contrat->client_comm_id); 90 91 print '<tr><td width="20%">Référence</td><td>'.$contrat->ref.'</td>'; 92 print '<td>Facturé : '.$contrat->facturable.'</td></tr>'; 93 94 print '<tr><td width="20%">Client</td><td>'; 95 print '<a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$client_comm->id.'">'; 96 97 print $client_comm->nom.'</a></td><td>'.$client_comm->code_client; 98 print '</td></tr>'; 99 100 $commercial = new User($db, $contrat->commercial_sign_id); 101 $commercial->fetch(); 102 103 print '<tr><td width="20%">Commercial Signature</td>'; 104 print '<td colspan="2">'.$commercial->fullname.'</td></tr>'; 105 106 $commercial_suiv = new User($db, $contrat->commercial_suiv_id); 107 $commercial_suiv->fetch(); 108 109 print '<tr><td width="20%">Commercial Suivi</td>'; 110 print '<td colspan="2">'.$commercial_suiv->fullname.'</td></tr>'; 111 112 $cuser_suiv = new User($db, $contrat->user_creat); 113 $cuser_suiv->fetch(); 114 115 print '<tr><td width="20%">Créé par</td>'; 116 print '<td colspan="2">'.$cuser_suiv->fullname; 117 print '</td></tr>'; 118 119 print '<tr><td width="20%">Créé le</td>'; 120 print '<td colspan="2">'.strftime("%e %B %Y",$contrat->date_creat); 121 print '</td></tr>'; 122 123 print "</table><br />"; 124 } 125 } 126 } 127 128 /* ************************************************************************** */ 129 /* */ 130 /* Barre d'action */ 131 /* */ 132 /* ************************************************************************** */ 133 134 $db->close(); 135 136 llxFooter("<em>Dernière modification $Date: 2005/09/07 07:50:53 $ révision $Revision: 1.5 $</em>"); 137 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |