* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ * */ /** \file htdocs/telephonie/ligne/infoc.php \ingroup telephonie \brief Lignes telephonie \version $Revision$ */ require("./pre.inc.php"); $mesg = ''; if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) { $ligne = new LigneTel($db); $ligne->id = $_GET["id"]; $ligne->code_analytique = $_POST["code_ana"]; if ( $ligne->update_infoc($user) ) { $action = ''; $mesg = 'Fiche mise à jour'; Header("Location: infoc.php?id=".$ligne->id); } else { $action = 're-edit'; $mesg = 'Fiche non mise à jour !' . "
" . $entrepot->mesg_error; } } llxHeader("","","Fiche Ligne"); if ($cancel == $langs->trans("Cancel")) { $action = ''; } /* * Affichage * */ /* * Création * */ if ($_GET["action"] == 'create') { $ligne = new LigneTel($db); print "
\n"; print ''; print ''."\n"; print_titre("Nouvelle ligne"); print ''; print ''; print ''; print ''; print ''; /* * Commercial */ print ''; /* * Concurrents */ print ''; print ''; print '"; print ''; print '
Numéro
Client'; print '
Client à facturer'; print '
Fournisseur'; print '
Commercial'; print '
Fournisseur précédent'; print '
Remise %
Note'; print '
 
'; print '
'; } else { if ($_GET["id"] or $_GET["numero"]) { if ($_GET["action"] <> 're-edit') { $ligne = new LigneTel($db); if ($_GET["id"]) { $result = $ligne->fetch_by_id($_GET["id"]); } 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/infoc.php?id=".$ligne->id; $head[$h][1] = $langs->trans('Infos'); $hselected = $h; $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'); $h++; dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Informations complémentaires', $mesg); print ''; print ''; print ''; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); print ''; $client_facture = new Societe($db); $client_facture->fetch($ligne->client_facture_id); print ''; print ''; print ''; print "
Numéro'.dolibarr_print_phone($ligne->numero).'Facturée : '.$ligne->facturable.'
Client'.$client->nom.'
Client Facturé'; print $client_facture->nom.''; print ''; if ($ligne->mode_paiement == 'pre') { print 'RIB : '.$client_facture->display_rib(); } else { print 'Paiement par virement'; } print '
Remise LMN'.$ligne->remise.' %
Code analytique'.$ligne->code_analytique.' 
"; } } if ($_GET["action"] == 'edit' || $action == 're-edit') { print_fiche_titre('Edition des informations complémentaires de la ligne', $mesg); print "
id\" method=\"post\">\n"; print ''; print ''; print ''; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); print ''; print ''; print ''; print ''; print '
Numéro'.$ligne->numero.'
Client'.$client->nom; print '
Remise LMN'.$ligne->remise.' %
Code Analytique 
 '; print 'Annuler
'; print '
'; } /* * * * */ } else { print "Error"; } } print ''; if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 2) { $form = new Form($db); print '
'; print '
'; print ''; print ''; print ''; print '
Activer'; print '
Date'; print $form->select_date(); print '
'; print '
'; print '
'; print ''; print ''; print ''; print '
Refuser'; print '
Date'; print $form->select_date(); print '
'; print '
'; } if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 5) { /** * Résiliation demandée */ $form = new Form($db); print '
'; print '
'; print ''; print ''; print ''; print '
Confirmation de la résiliation'; print '
Date'; print $form->select_date(); print '
'; print '
'; print ' 
'; } /* ************************************************************************** */ /* */ /* Barre d'action */ /* */ /* ************************************************************************** */ print "
\n"; if ($_GET["action"] == '') { print "id\">".$langs->trans("Edit").""; } print "
"; $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>