Bugfix
This commit is contained in:
parent
0f3b33b501
commit
46d2e704a0
@ -191,10 +191,16 @@ if ($_GET["facid"] > 0)
|
|||||||
$fac = New Facture($db);
|
$fac = New Facture($db);
|
||||||
if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0)
|
if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$soc = new Societe($db, $fac->socidp);
|
$soc = new Societe($db, $fac->socidp);
|
||||||
$soc->fetch($fac->socidp);
|
$soc->fetch($fac->socidp);
|
||||||
|
|
||||||
|
if (!$soc->perm_read)
|
||||||
|
{
|
||||||
|
print "Lecture non authorisée";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($soc->perm_read)
|
||||||
|
{
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
$author->id = $fac->user_author;
|
$author->id = $fac->user_author;
|
||||||
$author->fetch();
|
$author->fetch();
|
||||||
@ -730,11 +736,15 @@ if ($_GET["facid"] > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Facture non trouvée */
|
/* Facture non trouvée */
|
||||||
print $langs->trans("ErrorBillNotFound",$_GET["facid"]);
|
print $langs->trans("ErrorBillNotFound",$_GET["facid"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user