35 global $db, $langs, $conf;
40 $head[$tab][0] = DOL_URL_ROOT.
'/compta/tva/card.php?id='.$object->id;
41 $head[$tab][1] = $langs->trans(
'VATDeclaration');
42 $head[$tab][2] =
'card';
51 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
52 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
54 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
55 $nbLinks =
Link::count($db, $object->element, $object->id);
56 $head[$tab][0] = DOL_URL_ROOT.
'/compta/tva/document.php?id='.$object->id;
57 $head[$tab][1] = $langs->trans(
"Documents");
58 if (($nbFiles + $nbLinks) > 0) {
59 $head[$tab][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
61 $head[$tab][2] =
'documents';
64 $head[$tab][0] = DOL_URL_ROOT.
'/compta/tva/info.php?id='.$object->id;
65 $head[$tab][1] = $langs->trans(
"Info");
66 $head[$tab][2] =
'info';
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).