diff --git a/htdocs/telephonie/config/index.php b/htdocs/telephonie/config/index.php index efed4b88408..4a77f06086f 100644 --- a/htdocs/telephonie/config/index.php +++ b/htdocs/telephonie/config/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2007 Rodolphe Quiedeville * * 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 @@ -34,7 +34,7 @@ if (!$user->admin) accessforbidden(); if ($_GET["action"] == "set") { - for ($i = 1 ; $i < 3 ; $i++) + for ($i = 1 ; $i < 4 ; $i++) { dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"], $type='chaine'); } @@ -70,7 +70,7 @@ print 'Marge minimale'; print ''; print ''; -print 'TELEPHONIE_MARGE_MINI'; +print 'TELEPHONIE_MARGE_MINI'; print ''; print 'Compte de ventilation'; @@ -166,11 +166,37 @@ if ($resql) } $form->select_array("value2",$ff,TELEPHONIE_FOURNISSEUR_DEFAUT_ID); -print $ff[TELEPHONIE_FOURNISSEUR_DEFAUT_ID].'-'; +print '-'; print 'TELEPHONIE_FOURNISSEUR_DEFAUT_ID'; print ''; +print 'Grille vente par défaut'; +$gg = array(); +$gg[0] = "Aucune grille definie"; +$sql = "SELECT d.rowid,d.libelle"; +$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d"; +$sql .= " WHERE d.type_tarif='vente'"; +$sql .= " ORDER BY d.libelle"; + +$resql = $db->query($sql); +if ($resql) +{ + while ($row = $db->fetch_row($resql)) + { + $gg[$row[0]] = $row[1]; + } + $db->free($resql); +} + + +print ''; + +$form->select_array("value3",$gg,TELEPHONIE_GRILLE_VENTE_DEFAUT_ID); + +print ''; +print 'TELEPHONIE_GRILLE_VENTE_DEFAUT_ID'; +print ''; print ''; print '';