diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index 927e59f4877..e82a9a2dda7 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -2391,7 +2391,8 @@ else
$arrayoffiles=dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png|'.preg_quote(dol_sanitizeFileName($object->ref.'.pdf'), '/').')$');
$nbFiles = count($arrayoffiles);
$nbLinks=Link::count($db, $object->element, $object->id);
- if ($nbFiles >= 0)
+
+ if ($nbFiles > 0)
{
print '
global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>';
print '| ';
@@ -2484,6 +2485,13 @@ else
}
print ' |
';
}
+ else
+ {
+ print 'global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>';
+ print '| ';
+ print ''.$langs->trans("NoFilesUploadedYet").'';
+ print ' |
';
+ }
}
print '';
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 54c86a1589c..bd6ed75ba70 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -966,4 +966,5 @@ YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
Inventory=Inventory
AnalyticCode=Analytic code
TMenuMRP=MRP
-ShowMoreInfos=Show More Infos
\ No newline at end of file
+ShowMoreInfos=Show More Infos
+NoFilesUploadedYet=Please upload a document first