diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php
index 234c5e92918..fc7c50d5d70 100644
--- a/htdocs/ticket/document.php
+++ b/htdocs/ticket/document.php
@@ -145,7 +145,7 @@ if ($object->id) {
}
// Thirdparty
- if (!empty($conf->societe->enabled)) {
+ if (isModEnabled('societe')) {
$morehtmlref .= '
'.$langs->trans('ThirdParty');
/*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) {
$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '';
@@ -159,7 +159,7 @@ if ($object->id) {
}
// Project
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
'.$langs->trans('Project').' ';
if ($user->rights->ticket->write) {