From be7e424862bd183db49e216ffd79c2627bfbf256 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Dec 2018 00:16:59 +0100 Subject: [PATCH] FIX thirdparty not set on some events --- .../core/triggers/interface_50_modAgenda_ActionsAuto.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index bd96128a3d7..43c3f7a15e4 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -799,7 +799,8 @@ class InterfaceActionsAuto extends DolibarrTriggers if ($object->sendtoid > 0) $contactforaction->fetch($object->sendtoid); } // Set societeforaction. - if ($object->socid > 0) $societeforaction->fetch($object->socid); + if ($object->socid > 0) $societeforaction->fetch($object->socid); + elseif ($object->fk_soc > 0) $societeforaction->fetch($object->fk_soc); $projectid = isset($object->fk_project)?$object->fk_project:0; if ($object->element == 'project') $projectid = $object->id;