From 7e15ea256f5ab3f32d40667d2a501f6997cc21f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20David?= Date: Mon, 6 Feb 2023 16:35:53 +0100 Subject: [PATCH] fix: socid post param on clicktodial add event button --- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/lib/company.lib.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e42748bc61d..f5d45b751b4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -849,7 +849,7 @@ abstract class CommonObject } if ($this->element == 'contact') { $contactid = $this->id; - $thirdpartyid = empty($object->fk_soc) ? 0 : $object->fk_soc; + $thirdpartyid = empty($this->fk_soc) ? 0 : $this->fk_soc; } if ($this->element == 'user') { $contactid = $this->contact_id; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index b1d53e452bb..05b8e98e8ed 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1117,7 +1117,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl $extrafieldsobjectkey = $contactstatic->table_element; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - $sql = "SELECT t.rowid, t.entity, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,"; + $sql = "SELECT t.rowid, t.entity, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo, t.fk_soc,"; $sql .= " t.civility as civility_id, t.address, t.zip, t.town"; $sql .= ", t.note_private"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; @@ -1272,6 +1272,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl $contactstatic->email = $obj->email; $contactstatic->socialnetworks = $obj->socialnetworks; $contactstatic->photo = $obj->photo; + $contactstatic->fk_soc = $obj->fk_soc; $contactstatic->entity = $obj->entity; $country_code = getCountry($obj->country_id, 2);