diff --git a/htdocs/telephonie/contrat/services.php b/htdocs/telephonie/contrat/services.php
index dcf26fbfd52d641118c340a94e783d1088963580..dbf11e80a8caf8d2f4e1121630bcca5069da1b39 100644
--- a/htdocs/telephonie/contrat/services.php
+++ b/htdocs/telephonie/contrat/services.php
@@ -199,7 +199,8 @@ if ($_GET["id"])
print '<tr class="liste_titre"><td>Service</td>';
print '<td align="right">Montant Factur�</td>';
print '<td align="right">Montant du service</td>';
- print "<td> </td>\n";
+ if ($user->rights->telephonie->ligne->creer)
+ print "<td> </td>\n";
print '<td align="center">Ajout� par</td>';
print '<td align="center">Ajout� le</td></tr>';
@@ -218,9 +219,12 @@ if ($_GET["id"])
print '<td align="right">'.price($obj->montant_fac)." euros HT</td>\n";
print '<td align="right">'.price($obj->montant)." euros HT</td>\n";
+ if ($user->rights->telephonie->ligne->creer)
+ {
print '<td align="center"><a href="services.php?id='.$contrat->id.'&action=rmservice&service_id='.$obj->serid.'">';
print img_delete();
print "</a></td>";
+ }
print '<td align="center">'.$obj->firstname.' '.$obj->name.'</td>';
print '<td align="center">'.strftime("%d/%m/%y",$obj->date_creat).'</td>';
print "</tr>\n";
diff --git a/htdocs/telephonie/ligne/factures.php b/htdocs/telephonie/ligne/factures.php
index fcab1723e5ee4b3d2fc0bc1d3ebded158169beeb..933a51dde043d1c2bae045945de7c337409a96c4 100644
--- a/htdocs/telephonie/ligne/factures.php
+++ b/htdocs/telephonie/ligne/factures.php
@@ -42,8 +42,21 @@ if ($_GET["id"] or $_GET["numero"])
$result = $ligne->fetch($_GET["numero"]);
}
}
+
+
+ if ($result == 1)
+ {
+ $client_comm = new Societe($db);
+ $client_comm->fetch($ligne->client_comm_id, $user);
+ }
+
+ if (!$client_comm->perm_read)
+ {
+ print "Lecture non authoris�e";
+ }
+
- if ( $result )
+ if ($result == 1 && $client_comm->perm_read)
{
$h=0;
@@ -56,9 +69,11 @@ if ($_GET["id"] or $_GET["numero"])
$hselected = $h;
$h++;
+ /*
$head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/facturesdet.php?id=".$ligne->id;
$head[$h][1] = $langs->trans('Factures d�taill�es');
$h++;
+ */
$head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id;
$head[$h][1] = $langs->trans('Infos');
@@ -161,33 +176,34 @@ if ($_GET["id"] or $_GET["numero"])
print '<tr><td>Facture</td><td colspan="3"><a href="'.DOL_URL_ROOT.'/telephonie/client/facture.php?facid='.$fac->id.'">'.$fac->ref.'</a></td></tr>';
print "</table>\n";
- }
- /*
- *
- *
- *
- */
-
- $file = DOL_DATA_ROOT."/facture/".$fac->ref."/".$fac->ref.".pdf";
- $file_img = DOL_DATA_ROOT."/facture/".$fac->ref."/".$fac->ref.".pdf.png";
- if (file_exists($file_img))
- {
- print '<br><img src="../showfacture.php?facref='.$fac->ref.'"></img>';
- }
- else
- {
- if (file_exists("/usr/bin/convert"))
+ /*
+ *
+ *
+ *
+ */
+
+ $file = DOL_DATA_ROOT."/facture/".$fac->ref."/".$fac->ref.".pdf";
+ $file_img = DOL_DATA_ROOT."/facture/".$fac->ref."/".$fac->ref.".pdf.png";
+
+ if (file_exists($file_img))
{
- exec("/usr/bin/convert $file $file_img");
-
- if (file_exists($file_img))
- {
- print '<br><img src="../showfacture.php?facref='.$fac->ref.'"></img>';
- }
- else
+ print '<br><img src="../showfacture.php?uid='.$user->id.'&facref='.$fac->id.'"></img>';
+ }
+ else
+ {
+ if (file_exists("/usr/bin/convert"))
{
- print "Erreur ";
+ exec("/usr/bin/convert $file $file_img");
+
+ if (file_exists($file_img))
+ {
+ print '<br><img src="../showfacture.php?uid='.$user->id.'&facref='.$fac->id.'"></img>';
+ }
+ else
+ {
+ print "Erreur ";
+ }
}
}
}