Modif permissions
This commit is contained in:
parent
832091fc8d
commit
e2233fb0f0
@ -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";
|
||||
|
||||
@ -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 ( $result )
|
||||
if (!$client_comm->perm_read)
|
||||
{
|
||||
print "Lecture non authorisée";
|
||||
}
|
||||
|
||||
|
||||
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?uid='.$user->id.'&facref='.$fac->id.'"></img>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (file_exists("/usr/bin/convert"))
|
||||
{
|
||||
print '<br><img src="../showfacture.php?facref='.$fac->ref.'"></img>';
|
||||
}
|
||||
else
|
||||
{
|
||||
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 ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user