Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0

Conflicts:
	htdocs/core/lib/agenda.lib.php
This commit is contained in:
Laurent Destailleur 2020-10-06 13:15:52 +02:00
commit 6933b7ec9c

View File

@ -219,7 +219,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
*/
function show_array_actions_to_do($max = 5)
{
global $langs, $conf, $user, $db, $bc, $socid;
global $langs, $conf, $user, $db, $socid;
$now = dol_now();
@ -233,7 +233,7 @@ function show_array_actions_to_do($max = 5)
$sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE a.entity = ".$conf->entity;
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
$sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
if ($socid) $sql .= " AND s.rowid = ".$socid;
@ -320,7 +320,7 @@ function show_array_actions_to_do($max = 5)
*/
function show_array_last_actions_done($max = 5)
{
global $langs, $conf, $user, $db, $bc, $socid;
global $langs, $conf, $user, $db, $socid;
$now = dol_now();
@ -331,7 +331,7 @@ function show_array_last_actions_done($max = 5)
$sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE a.entity = ".$conf->entity;
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
$sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
if ($socid) $sql .= " AND s.rowid = ".$socid;