[ 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: commande.php,v 1.3 2005/02/21 12:25:33 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/ligne/commande.php,v $ 20 * 21 */ 22 23 require ("./pre.inc.php"); 24 require(DOL_DOCUMENT_ROOT."/telephonie/fournisseurtel.class.php"); 25 $mesg = ''; 26 27 llxHeader("","","Fiche Ligne"); 28 29 if ($_GET["id"] or $_GET["numero"]) 30 { 31 if ($_GET["action"] <> 're-edit') 32 { 33 $ligne = new LigneTel($db); 34 if ($_GET["id"]) 35 { 36 $result = $ligne->fetch_by_id($_GET["id"]); 37 } 38 if ($_GET["numero"]) 39 { 40 $result = $ligne->fetch($_GET["numero"]); 41 } 42 } 43 44 if ( $result ) 45 { 46 47 $h=0; 48 $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; 49 $head[$h][1] = $langs->trans("Ligne"); 50 $h++; 51 52 $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/commande.php?id=".$ligne->id; 53 $head[$h][1] = $langs->trans('Commande'); 54 $hselected = $h; 55 $h++; 56 57 $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; 58 $head[$h][1] = $langs->trans('Infos'); 59 $h++; 60 61 $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/history.php?id=".$ligne->id; 62 $head[$h][1] = $langs->trans('Historique'); 63 $h++; 64 65 $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/conso.php?id=".$ligne->id; 66 $head[$h][1] = $langs->trans('Conso'); 67 $h++; 68 69 $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/stat.php?id=".$ligne->id; 70 $head[$h][1] = $langs->trans('Stats'); 71 $h++; 72 73 dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); 74 75 print_fiche_titre('Factures Ligne', $mesg); 76 77 print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; 78 79 print '<tr><td width="25%">Numéro</td><td>'.dolibarr_print_phone($ligne->numero).'</td></tr>'; 80 81 $client = new Societe($db, $ligne->client_id); 82 $client->fetch($ligne->client_id); 83 84 print '<tr><td width="25%">Client</td><td>'; 85 86 print '<a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$ligne->client_id.'">'; 87 print $client->nom.'</a></td></tr>'; 88 89 $client_facture = new Societe($db); 90 $client_facture->fetch($ligne->client_facture_id); 91 92 print '<tr><td width="25%">Client Facturé</td><td>'.$client_facture->nom.'</td></tr>'; 93 print '</table>'; 94 95 $ftx = new FournisseurTelephonie($db, $ligne->fournisseur_id); 96 $ftx->fetch($ligne->fournisseur_id); 97 98 if (strlen($ligne->numero) <> 10) 99 { 100 $ok_commande = 0; 101 } 102 else 103 { 104 $ok_commande = 1; 105 } 106 107 print '<table>'; 108 print "<tr><td>Numéro correct </td><td> ".$ok_commande .'</td></tr>'; 109 print "<tr><td>Commandes ouvertes auprès du fournisseur </td><td> ".$ftx->commande_enable .'</td></tr>'; 110 print "<tr><td>Permission pour l'utilisateur de commander des lignes </td><td> ".$user->rights->telephonie->ligne_commander.'</td></tr>'; 111 print "<tr><td>Statut de la ligne compatible </td><td> ".($ligne->statut == 1 or $ligne->statut == -1) .'</td></tr>'; 112 print "<tr><td>Rib ok ou mode de règlement par virement </td><td> ".($client_facture->verif_rib() or $ligne->mode_paiement == 'vir').'</td></tr>'; 113 print '</table>'; 114 115 } 116 } 117 else 118 { 119 print "Error"; 120 } 121 122 $db->close(); 123 124 llxFooter("<em>Dernière modification $Date: 2005/02/21 12:25:33 $ révision $Revision: 1.3 $</em>"); 125 ?>
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 |
![]() |