diff --git a/htdocs/telephonie/ligne/conso.php b/htdocs/telephonie/ligne/conso.php index 6064a212be0..27c3c788549 100644 --- a/htdocs/telephonie/ligne/conso.php +++ b/htdocs/telephonie/ligne/conso.php @@ -28,137 +28,123 @@ llxHeader("","","Fiche Ligne"); - if ($_GET["id"] or $_GET["numero"]) +if ($_GET["id"] or $_GET["numero"]) +{ + if ($_GET["action"] <> 're-edit') { - if ($_GET["action"] <> 're-edit') + $ligne = new LigneTel($db); + if ($_GET["id"]) { - $ligne = new LigneTel($db); - if ($_GET["id"]) - { - $result = $ligne->fetch_by_id($_GET["id"]); - } - if ($_GET["numero"]) - { - $result = $ligne->fetch($_GET["numero"]); - } + $result = $ligne->fetch_by_id($_GET["id"]); } - - if ( $result ) - { - if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') - { - - $h=0; - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; - $head[$h][1] = $langs->trans("Ligne"); - $h++; - - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/factures.php?id=".$ligne->id; - $head[$h][1] = $langs->trans('Factures'); - $h++; - - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; - $head[$h][1] = $langs->trans('Infos'); - $h++; + if ($_GET["numero"]) + { + $result = $ligne->fetch($_GET["numero"]); + } + } + + if ( $result ) + { + if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') + { + + $h=0; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; + $head[$h][1] = $langs->trans("Ligne"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/factures.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Factures'); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Infos'); + $h++; - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/history.php?id=".$ligne->id; - $head[$h][1] = $langs->trans('Historique'); - $h++; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/history.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Historique'); + $h++; - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/conso.php?id=".$ligne->id; - $head[$h][1] = $langs->trans('Conso'); - $hselected = $h; - $h++; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/conso.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Conso'); + $hselected = $h; + $h++; - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/stat.php?id=".$ligne->id; - $head[$h][1] = $langs->trans('Stats'); - $h++; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/stat.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Stats'); + $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); - print_fiche_titre('Fiche Ligne', $mesg); + print_fiche_titre('Fiche Ligne', $mesg); - print '
| Numéro | '.dolibarr_print_phone($ligne->numero).' | '; - print 'Facturée : '.$ligne->facturable.' | |
| Numéro | '.dolibarr_print_phone($ligne->numero).' | '; + print 'Facturée : '.$ligne->facturable.' | |
| Client | '; + print ' | ||
| Client | '; - print ''; - print $client->nom.' | '; + print ''; + print $client->nom.''; - $client_facture = new Societe($db); - $client_facture->fetch($ligne->client_facture_id); + $client_facture = new Societe($db); + $client_facture->fetch($ligne->client_facture_id); - print 'Client Facturé | '.$client_facture->nom.' | Client Facturé | '.$client_facture->nom.' | '; - print '
| Statut | ';
- print ' ';
- print $ligne->statuts[$ligne->statut];
- print ' | ||
| Statut | ';
+ print ' ';
+ print $ligne->statuts[$ligne->statut];
+ print ' | ||
| '.strftime("%A %d %B %Y",$row[0]).' | '; - - print ' ';
- print $ligne->statuts[$row[1]]." | ";
- print ''.$row[4] . " " . $row[3] . " | |
| Date de la dernière communication | '; + print ''.strftime("%A %d %B %Y",$row[0]).' | '; + print '||
| ';
- print ' '; - print 'liste '; - print ' | ';
- print ' | ||