From 5802eb63ecf07f5100e697cc471272429b1043db Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 7 May 2018 11:36:34 +0200 Subject: [PATCH] FIX name of trigger and use of context --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 05e15b9cb03..69812787b8c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1930,9 +1930,9 @@ class Societe extends CommonObject dol_syslog(get_class($this)."::add_commercial Erreur"); } else { - $this->commercial_modified = $commid; + $this->context=array('commercial_modified'=>$commid); - $result=$this->call_trigger('COMPANY_ADD_COMMERCIAL',$user); + $result=$this->call_trigger('COMPANY_LINK_SALE_REPRESENTATIVE',$user); if ($result < 0) $error++; } } @@ -1948,9 +1948,9 @@ class Societe extends CommonObject function del_commercial(User $user, $commid) { $error=0; - $this->commercial_modified = $commid; + $this->context=array('commercial_modified'=>$commid); - $result=$this->call_trigger('COMPANY_DEL_COMMERCIAL',$user); + $result=$this->call_trigger('COMPANY_UNLINK_SALE_REPRESENTATIVE',$user); if ($result < 0) $error++; if ($this->id > 0 && $commid > 0)