37 global $db, $langs, $conf, $user;
39 $langs->loadLangs(array(
"sendings",
"deliveries"));
44 $head[$h][0] = DOL_URL_ROOT.
"/reception/card.php?id=".
$object->id;
45 $head[$h][1] = $langs->trans(
"ReceptionCard");
46 $head[$h][2] =
'reception';
50 $head[$h][0] = DOL_URL_ROOT.
"/reception/dispatch.php?id=".
$object->id;
51 $head[$h][1] = $langs->trans(
"ReceptionDistribution");
52 $head[$h][2] =
'dispatch';
58 if (
$object->origin ==
'supplier_order' &&
$object->origin_id > 0) {
60 $objectsrc->fetch(
$object->origin_id);
62 $nbContact = count($objectsrc->liste_contact(-1,
'internal')) + count($objectsrc->liste_contact(-1,
'external'));
63 $head[$h][0] = DOL_URL_ROOT.
"/reception/contact.php?id=".
$object->id;
64 $head[$h][1] = $langs->trans(
"ContactsAddresses");
66 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbContact.
'</span>';
68 $head[$h][2] =
'contact';
78 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
79 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
81 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
83 $head[$h][0] = DOL_URL_ROOT.
'/reception/document.php?id='.
$object->id;
84 $head[$h][1] = $langs->trans(
'Documents');
85 if (($nbFiles + $nbLinks) > 0) {
86 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
88 $head[$h][2] =
'documents';
92 if (!empty(
$object->note_private)) {
95 if (!empty(
$object->note_public)) {
98 $head[$h][0] = DOL_URL_ROOT.
"/reception/note.php?id=".
$object->id;
99 $head[$h][1] = $langs->trans(
"Notes");
101 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
103 $head[$h][2] =
'note';
120 global $langs, $conf, $user, $db;
121 $langs->load(
"receptions");
124 $extrafields->fetch_name_optionals_label(
'reception');
125 $extrafields->fetch_name_optionals_label(
'receptiondet_batch');
130 $head[$h][0] = DOL_URL_ROOT.
"/admin/reception_setup.php";
131 $head[$h][1] = $langs->trans(
"Reception");
132 $head[$h][2] =
'reception';
138 $head[$h][0] = DOL_URL_ROOT.
'/admin/reception_extrafields.php';
139 $head[$h][1] = $langs->trans(
"ExtraFields");
140 $nbExtrafields = $extrafields->attributes[
'reception'][
'count'];
141 if ($nbExtrafields > 0) {
142 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
144 $head[$h][2] =
'attributes_reception';
149 $head[$h][0] = DOL_URL_ROOT.
'/admin/receptiondet_batch_extrafields.php';
150 $head[$h][1] = $langs->trans(
"ExtraFieldsLines");
151 $nbExtrafields = $extrafields->attributes[
'receptiondet_batch'][
'count'];
152 if ($nbExtrafields > 0) {
153 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
155 $head[$h][2] =
'attributeslines_reception';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage predefined suppliers products.
static count($dbs, $objecttype, $objectid)
Return nb of links.
Class to manage receptions.
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).
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
reception_admin_prepare_head()
Return array head with list of tabs to view object information.
reception_prepare_head(Reception $object)
Prepare array with list of tabs.