forked from Wavyzz/dolibarr
code syntax core directory
This commit is contained in:
@@ -47,18 +47,18 @@ function reception_prepare_head(Reception $object)
|
||||
$head[$h][2] = 'reception';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
|
||||
$objectsrc = $object;
|
||||
if ($object->origin == 'commande' && $object->origin_id > 0)
|
||||
{
|
||||
if ($object->origin == 'commande' && $object->origin_id > 0) {
|
||||
$objectsrc = new Commande($db);
|
||||
$objectsrc->fetch($object->origin_id);
|
||||
}
|
||||
$nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external'));
|
||||
$head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
if ($nbContact > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
|
||||
if ($nbContact > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
}
|
||||
@@ -70,11 +70,17 @@ function reception_prepare_head(Reception $object)
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception');
|
||||
|
||||
$nbNote = 0;
|
||||
if (!empty($object->note_private)) $nbNote++;
|
||||
if (!empty($object->note_public)) $nbNote++;
|
||||
if (!empty($object->note_private)) {
|
||||
$nbNote++;
|
||||
}
|
||||
if (!empty($object->note_public)) {
|
||||
$nbNote++;
|
||||
}
|
||||
$head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Notes");
|
||||
if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
|
||||
if ($nbNote > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'note';
|
||||
$h++;
|
||||
|
||||
@@ -103,16 +109,14 @@ function reception_admin_prepare_head()
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'reception_admin');
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION))
|
||||
{
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$head[$h][2] = 'attributes_reception';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION))
|
||||
{
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$head[$h][2] = 'attributeslines_reception';
|
||||
|
||||
Reference in New Issue
Block a user