Modif permissions
This commit is contained in:
parent
6c8abd009a
commit
5f68b914f1
@ -31,6 +31,9 @@ require("./pre.inc.php");
|
||||
|
||||
$user->getrights(); // On a besoin des permissions sur plusieurs modules
|
||||
|
||||
if (!$user->rights->compta->general->lire)
|
||||
accessforbidden();
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
|
||||
@ -52,16 +55,16 @@ llxHeader("",$langs->trans("AccountancyTreasuryArea"));
|
||||
|
||||
if (isset($_GET["action"]) && $_GET["action"] == 'add_bookmark')
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id;
|
||||
if (! $db->query($sql) )
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id;
|
||||
if (! $db->query($sql) )
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");";
|
||||
if (! $db->query($sql) )
|
||||
{
|
||||
}
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");";
|
||||
if (! $db->query($sql) )
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark')
|
||||
@ -85,7 +88,8 @@ print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
/*
|
||||
* Zone recherche facture
|
||||
*/
|
||||
if ($conf->facture->enabled) {
|
||||
if ($conf->facture->enabled)
|
||||
{
|
||||
print '<form method="post" action="facture.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
@ -103,7 +107,6 @@ if ($conf->facture->enabled) {
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
{
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, s.nom, s.idp";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE s.idp = f.fk_soc AND f.fk_statut = 0";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user