36 global $db, $langs, $conf;
41 $head[$tab][0] = DOL_URL_ROOT.
'/compta/tva/card.php?id='.
$object->id;
42 $head[$tab][1] = $langs->trans(
'VATDeclaration');
43 $head[$tab][2] =
'card';
52 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
53 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
55 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
57 $head[$tab][0] = DOL_URL_ROOT.
'/compta/tva/document.php?id='.
$object->id;
58 $head[$tab][1] = $langs->trans(
"Documents");
59 if (($nbFiles + $nbLinks) > 0) {
60 $head[$tab][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
62 $head[$tab][2] =
'documents';
65 $head[$tab][0] = DOL_URL_ROOT.
'/compta/tva/info.php?id='.
$object->id;
66 $head[$tab][1] = $langs->trans(
"Info");
67 $head[$tab][2] =
'info';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
static count($dbs, $objecttype, $objectid)
Return nb of links.
dol_dir_list($utf8_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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
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).
vat_prepare_head($object)
Prepare array with list of tabs.