FIX link to create event when task is in a project with a thirdparty

This commit is contained in:
Laurent Destailleur 2021-02-04 13:03:05 +01:00
parent 91c594a66a
commit b58b3a4932

View File

@ -650,7 +650,8 @@ if ($id > 0 || !empty($ref))
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'task', $socid, 1, '', 10, 'withproject='.$withproject);
$defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid;
$formactions->showactions($object, 'task', $defaultthirdpartyid, 1, '', 10, 'withproject='.$withproject);
print '</div></div></div>';
}