Fix: Action shown late when not
This commit is contained in:
parent
65d7d4f546
commit
aa6394de85
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user