diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index cb0e38b7a34..73b9d94bdda 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; -if (!empty($conf->category->enabled)) { +if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } @@ -72,7 +72,7 @@ $endyear = $year; /* * View */ -if (!empty($conf->category->enabled)) { +if (isModEnabled('categorie')) { $langs->load('categories'); } $form = new Form($db); @@ -299,7 +299,7 @@ if ($user->admin) { print ''; // Category -if (!empty($conf->category->enabled)) { +if (isModEnabled('categorie')) { if ($mode == 'customer') { $cat_type = Categorie::TYPE_CUSTOMER; $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));