36 $langs->load(
"inventory");
41 $head[$h][0] = DOL_URL_ROOT.
"/admin/inventory.php";
42 $head[$h][1] = $langs->trans(
"Parameters");
43 $head[$h][2] =
'settings';
76 array(
dol_buildpath(
'/product/inventory/card.php?id='.$inventory->id.$get, 1), $langs->trans(
'Card'),
'card'),
77 array(
dol_buildpath(
'/product/inventory/inventory.php?id='.$inventory->id.$get, 1), $langs->trans(
'Inventory'),
'inventory')
82 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
83 $upload_dir =
$conf->stock->multidir_output[$inventory->entity ? $inventory->entity :
$conf->entity].
'/inventory/'.
dol_sanitizeFileName((
string) $inventory->ref);
84 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
85 $head[$h][0] =
dol_buildpath(
'/product/inventory/inventory_document.php?id='.$inventory->id.$get, 1);
86 $head[$h][1] = $langs->trans(
'Documents');
88 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbFiles.
'</span>';
90 $head[$h][2] =
'document';
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, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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).
inventoryPrepareHead(&$inventory, $title='Inventory', $get='')
Define head array for tabs of inventory tools setup pages.
inventoryAdminPrepareHead()
Define head array for tabs of inventory tools setup pages.