38 global $db, $langs, $conf, $user;
40 $langs->loadLangs(array(
"sendings",
"deliveries"));
45 $head[$h][0] = DOL_URL_ROOT.
"/reception/card.php?id=".
$object->id;
46 $head[$h][1] = $langs->trans(
"ReceptionCard");
47 $head[$h][2] =
'reception';
51 $head[$h][0] = DOL_URL_ROOT.
"/reception/dispatch.php?id=".
$object->id;
52 $head[$h][1] = $langs->trans(
"ReceptionDistribution");
53 $head[$h][2] =
'dispatch';
59 if (
$object->origin ==
'supplier_order' &&
$object->origin_id > 0) {
61 $objectsrc->fetch(
$object->origin_id);
63 $nbContact = count($objectsrc->liste_contact(-1,
'internal')) + count($objectsrc->liste_contact(-1,
'external'));
64 $head[$h][0] = DOL_URL_ROOT.
"/reception/contact.php?id=".
$object->id;
65 $head[$h][1] = $langs->trans(
"ContactsAddresses");
67 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbContact.
'</span>';
69 $head[$h][2] =
'contact';
79 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
80 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
82 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
84 $head[$h][0] = DOL_URL_ROOT.
'/reception/document.php?id='.
$object->id;
85 $head[$h][1] = $langs->trans(
'Documents');
86 if (($nbFiles + $nbLinks) > 0) {
87 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
89 $head[$h][2] =
'documents';
93 if (!empty(
$object->note_private)) {
96 if (!empty(
$object->note_public)) {
99 $head[$h][0] = DOL_URL_ROOT.
"/reception/note.php?id=".
$object->id;
100 $head[$h][1] = $langs->trans(
"Notes");
102 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
104 $head[$h][2] =
'note';
121 global $langs, $conf, $user, $db;
122 $langs->load(
"receptions");
125 $extrafields->fetch_name_optionals_label(
'reception');
126 $extrafields->fetch_name_optionals_label(
'receptiondet_batch');
131 $head[$h][0] = DOL_URL_ROOT.
"/admin/reception_setup.php";
132 $head[$h][1] = $langs->trans(
"Reception");
133 $head[$h][2] =
'reception';
139 $head[$h][0] = DOL_URL_ROOT.
'/admin/reception_extrafields.php';
140 $head[$h][1] = $langs->trans(
"ExtraFields");
141 $nbExtrafields = $extrafields->attributes[
'reception'][
'count'];
142 if ($nbExtrafields > 0) {
143 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
145 $head[$h][2] =
'attributes_reception';
150 $head[$h][0] = DOL_URL_ROOT.
'/admin/receptiondet_batch_extrafields.php';
151 $head[$h][1] = $langs->trans(
"ExtraFieldsLines");
152 $nbExtrafields = $extrafields->attributes[
'receptiondet_batch'][
'count'];
153 if ($nbExtrafields > 0) {
154 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
156 $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 a 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.