Skip to content
Snippets Groups Projects
Commit 1dca56c2 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Calculation of number of linked files was not working on taxes.

parent ca36a4dd
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,12 @@ function tax_prepare_head($object) ...@@ -49,8 +49,12 @@ function tax_prepare_head($object)
// $this->tabs = array('entity:-tabname); to remove a tab // $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'tax'); complete_head_from_modules($conf,$langs,$object,$head,$h,'tax');
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->tax->dir_output . "/" . dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir,'files'));
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment