diff --git a/htdocs/telephonie/ligne/fiche.php b/htdocs/telephonie/ligne/fiche.php
index d538fdee91f..8d5509215b8 100644
--- a/htdocs/telephonie/ligne/fiche.php
+++ b/htdocs/telephonie/ligne/fiche.php
@@ -80,7 +80,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
}
}
-if ($_POST["action"] == 'updateremise')
+if ($_POST["action"] == 'updateremise' && $user->rights->telephonie->ligne->creer)
{
$ligne = new LigneTel($db);
$ligne->id = $_GET["id"];
@@ -95,6 +95,17 @@ if ($_POST["action"] == 'updateremise')
}
}
+if ($_POST["action"] == 'changecontrat' && $user->rights->telephonie->ligne->creer)
+{
+ $ligne = new LigneTel($db);
+ $ligne->id = $_GET["id"];
+
+ if ( $ligne->ChangeContrat($user, $_POST["contrat"]) == 0)
+ {
+ Header("Location: fiche.php?id=".$ligne->id);
+ }
+}
+
if ($_POST["action"] == 'addcontact')
{
$ligne = new LigneTel($db);
@@ -687,7 +698,7 @@ else
$i++;
}
}
- $db->free();
+ $db->free();
}
else
@@ -705,7 +716,7 @@ else
print "
";
- if ($_GET["action"] == "editremise" && $ligne->statut <> 6)
+ if ($_GET["action"] == "editremise" && $ligne->statut <> 6 && $user->rights->telephonie->ligne->creer)
{
/**
* Edition de la remise
@@ -728,6 +739,53 @@ else
print '';
}
+ if ($_GET["action"] == "chgcontrat" && $user->rights->telephonie->ligne->creer)
+ {
+ /**
+ * Edition de la remise
+ */
+
+ print '