diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index 58273a67ebe..04044e0ad97 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -2258,7 +2258,7 @@ else
print ''.$langs->trans("UploadANewFileNow");
print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
print '';
- if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
{
print ' - '.''.$langs->trans("AttachTheNewLineToTheDocument");
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
@@ -2389,7 +2389,7 @@ else
$nbFiles = $nbLinks = 0;
$arrayoffiles = array();
- if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
@@ -2406,7 +2406,7 @@ else
print ''.$langs->trans("UploadANewFileNow");
print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
print '';
- if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
+ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
{
print ' - '.''.$langs->trans("AttachTheNewLineToTheDocument");
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php
index 48f21bc3dc2..aa66409f3ba 100644
--- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php
+++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php
@@ -1,6 +1,6 @@
global->MAIN_FEATURES_LEVEL >= 2)
+if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
{
print ''."\n";