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