This commit is contained in:
Rodolphe Quiedeville 2005-09-06 10:24:22 +00:00
parent 0f3b33b501
commit 46d2e704a0

View File

@ -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();