Skip to content
Snippets Groups Projects
Commit aa6394de authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Action shown late when not

parent 65d7d4f5
No related branches found
No related tags found
No related merge requests found
......@@ -374,7 +374,7 @@ class ActionComm
global $conf, $user;
$this->nbtodo=$this->nbtodolate=0;
$sql = "SELECT a.id,".$this->db->pdate("a.datea")." as da";
$sql = "SELECT a.id,".$this->db->pdate("a.datep")." as dp";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
......@@ -387,7 +387,7 @@ class ActionComm
while ($obj=$this->db->fetch_object($resql))
{
$this->nbtodo++;
if ($obj->da < (time() - $conf->actions->warning_delay)) $this->nbtodolate++;
if ($obj->dp < (time() - $conf->actions->warning_delay)) $this->nbtodolate++;
}
return 1;
}
......
......@@ -254,12 +254,13 @@ print '</tr>';
$nboflate=0;
$var=true;
//
// Ne pas inclure de sections sans gestion de permissions
//
// Nbre actions faire (en retard)
if ($conf->commercial->enabled || $conf->compta->enabled || $conf->comptaexpert->enabled)
if ($conf->agenda->enabled && $user->rights->agenda->myactions->read)
{
include_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
$board=new ActionComm($db);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment