From 45e947ee2b73063cd4cb7e8e55f80367d1707eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 17 Feb 2021 22:16:07 +0100 Subject: [PATCH] count actioncomm for thirdparty tab agenda --- htdocs/core/lib/company.lib.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 867180ef9b6..1fd7b653925 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -304,21 +304,21 @@ function societe_prepare_head(Societe $object) $head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; $head[$h][1] = $langs->trans("Events"); if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $nbNote = 0; + $nbEvent = 0; $sql = "SELECT COUNT(id) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm"; $sql .= " WHERE fk_soc = ".$object->id; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbNote = $obj->nb; + $nbEvent = $obj->nb; } else { dol_print_error($db); } $head[$h][1] .= '/'; $head[$h][1] .= $langs->trans("Agenda"); - if ($nbNote > 0) { - $head[$h][1] .= ''.$nbNote.''; + if ($nbEvent > 0) { + $head[$h][1] .= ''.$nbEvent.''; } } $head[$h][2] = 'agenda'; @@ -326,9 +326,9 @@ function societe_prepare_head(Societe $object) // Log /*$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Info"); - $head[$h][2] = 'info'; - $h++;*/ + $head[$h][1] = $langs->trans("Info"); + $head[$h][2] = 'info'; + $h++;*/ complete_head_from_modules($conf, $langs, $object, $head, $h, 'thirdparty', 'remove'); @@ -1003,7 +1003,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') } elseif (in_array($key, array('role'))) { print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles); } else { - print ''; + print ''; } print ''; }