diff --git a/htdocs/telephonie/tarifs/index.php b/htdocs/telephonie/tarifs/index.php index a9c3ddfe5ff..471637ce8b1 100644 --- a/htdocs/telephonie/tarifs/index.php +++ b/htdocs/telephonie/tarifs/index.php @@ -70,24 +70,27 @@ $offset = $conf->liste_limit * $page ; * */ -$sql = "SELECT d.libelle as tarif_desc, d.type_tarif"; +$sql = "SELECT d.rowid as grille, d.libelle as tarif_desc, d.type_tarif"; $sql .= " , t.libelle as tarif, t.rowid as tarif_id"; $sql .= " , m.temporel, m.fixe"; +$sql .= " , u.code"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d"; $sql .= "," . MAIN_DB_PREFIX."telephonie_tarif_montant as m"; $sql .= "," . MAIN_DB_PREFIX."telephonie_tarif as t"; +$sql .= "," . MAIN_DB_PREFIX."user as u"; $sqlc .= " WHERE d.rowid = m.fk_tarif_desc"; $sqlc .= " AND m.fk_tarif = t.rowid"; +$sqlc .= " AND m.fk_user = u.rowid"; if ($_GET["search_libelle"]) { $sqlc .=" AND t.libelle LIKE '%".$_GET["search_libelle"]."%'"; } -if ($_GET["search_prefix"]) +if ($_GET["search_grille"]) { - $sqlc .=" AND tf.prefix LIKE '%".$_GET["search_prefix"]."%'"; + $sqlc .=" AND d.libelle LIKE '%".$_GET["search_grille"]."%'"; } if ($_GET["type"]) @@ -117,16 +120,17 @@ if ($result) print_liste_field_titre("Cout / min","index.php","temporel", "&type=".$_GET["type"]); print ""; print "