From f6ff9a921829ff9c5b65336bf964e241b1783c47 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 24 Aug 2005 08:02:31 +0000 Subject: [PATCH] Ajout fournisseur pas defaut --- htdocs/telephonie/config/index.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/htdocs/telephonie/config/index.php b/htdocs/telephonie/config/index.php index 19721eca6f6..c144b571ab2 100644 --- a/htdocs/telephonie/config/index.php +++ b/htdocs/telephonie/config/index.php @@ -34,7 +34,7 @@ if (!$user->admin) accessforbidden(); if ($_GET["action"] == "set") { - for ($i = 1 ; $i < 2 ; $i++) + for ($i = 1 ; $i < 3 ; $i++) { dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"], $type='chaine'); } @@ -151,6 +151,27 @@ print 'TELEPHONIE_GROUPE_COMMERCIAUX_ID'; /* ***************************************** */ +$form = new Form($db); +print 'Fournisseur par défaut'; +$ff = array(); +$sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."telephonie_fournisseur WHERE commande_active = 1 ORDER BY nom "; +$resql = $db->query($sql); +if ($resql) +{ + while ($row = $db->fetch_row($resql)) + { + $ff[$row[0]] = $row[1]; + } + $db->free($resql); +} +$form->select_array("value2",$ff,TELEPHONIE_FOURNISSEUR_DEFAUT_ID); + +print $ff[TELEPHONIE_FOURNISSEUR_DEFAUT_ID].'-'; +print 'TELEPHONIE_FOURNISSEUR_DEFAUT_ID'; +print ''; + + + print ''; print '';