94 global $langs,
$conf, $user, $extrafields;
96 $extrafields->fetch_name_optionals_label(
'entrepot');
97 $extrafields->fetch_name_optionals_label(
'stock_mouvement');
98 $extrafields->fetch_name_optionals_label(
'inventory');
103 $head[$h][0] = DOL_URL_ROOT.
'/admin/stock.php';
104 $head[$h][1] = $langs->trans(
"Miscellaneous");
105 $head[$h][2] =
'general';
112 $head[$h][0] = DOL_URL_ROOT.
'/admin/inventory.php';
113 $head[$h][1] = $langs->trans(
"Inventory");
114 $head[$h][2] =
'inventory';
119 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/admin/extrafields.php', array(
'elementtype' =>
'entrepot'));
120 $head[$h][1] = $langs->trans(
"StockSetupExtraFields");
121 $nbExtrafields = $extrafields->attributes[
'entrepot'][
'count'];
122 if ($nbExtrafields > 0) {
123 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
125 $head[$h][2] =
'attributes';
128 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/admin/extrafields.php', array(
'elementtype' =>
'stock_mouvement'));
129 $head[$h][1] = $langs->trans(
"StockMouvementExtraFields");
130 $nbExtrafields = $extrafields->attributes[
'stock_mouvement'][
'count'];
131 if ($nbExtrafields > 0) {
132 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
134 $head[$h][2] =
'stockMouvementAttributes';
137 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/admin/extrafields.php', array(
'elementtype' =>
'inventory'));
138 $head[$h][1] = $langs->trans(
"InventoryExtraFields");
139 $nbExtrafields = $extrafields->attributes[
'inventory'][
'count'];
140 if ($nbExtrafields > 0) {
141 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
143 $head[$h][2] =
'inventoryAttributes';
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
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).