36 global $db, $langs,
$conf, $user;
39 $langs->loadLangs(array(
"supplier_proposal",
"compta"));
44 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/card.php?id='.
$object->id;
45 $head[$h][1] = $langs->trans(
'CommRequests');
46 $head[$h][2] =
'comm';
50 $nbContact = count(
$object->liste_contact(-1,
'internal')) + count(
$object->liste_contact(-1,
'external'));
51 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/contact.php?id='.
$object->id;
52 $head[$h][1] = $langs->trans(
'ContactsAddresses');
54 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbContact.
'</span>';
56 $head[$h][2] =
'contact';
68 if (!empty(
$object->note_private)) {
71 if (!empty(
$object->note_public)) {
74 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/note.php?id='.
$object->id;
75 $head[$h][1] = $langs->trans(
'Notes');
77 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
79 $head[$h][2] =
'note';
83 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
84 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
86 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
88 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/document.php?id='.
$object->id;
89 $head[$h][1] = $langs->trans(
'Documents');
90 if (($nbFiles + $nbLinks) > 0) {
91 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
93 $head[$h][2] =
'document';
96 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/info.php?id='.
$object->id;
97 $head[$h][1] = $langs->trans(
'Info');
98 $head[$h][2] =
'info';
115 global $langs,
$conf, $user, $db;
118 $extrafields->fetch_name_optionals_label(
'supplier_proposal');
119 $extrafields->fetch_name_optionals_label(
'supplier_proposaldet');
124 $head[$h][0] = DOL_URL_ROOT.
'/admin/supplier_proposal.php';
125 $head[$h][1] = $langs->trans(
"Miscellaneous");
126 $head[$h][2] =
'general';
135 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/admin/supplier_proposal_extrafields.php';
136 $head[$h][1] = $langs->trans(
"ExtraFields");
137 $nbExtrafields = $extrafields->attributes[
'supplier_proposal'][
'count'];
138 if ($nbExtrafields > 0) {
139 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
141 $head[$h][2] =
'attributes';
144 $head[$h][0] = DOL_URL_ROOT.
'/supplier_proposal/admin/supplier_proposaldet_extrafields.php';
145 $head[$h][1] = $langs->trans(
"ExtraFieldsLines");
146 $nbExtrafields = $extrafields->attributes[
'supplier_proposaldet'][
'count'];
147 if ($nbExtrafields > 0) {
148 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
150 $head[$h][2] =
'attributeslines';
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).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
supplier_proposal_prepare_head($object)
Prepare array with list of tabs.
supplier_proposal_admin_prepare_head()
Return array head with list of tabs to view object information.