From 83afee60470382c3b82597bb76ed7362f09253b5 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 24 Oct 2022 07:47:43 +0200 Subject: [PATCH 1/3] FIX can not set prospect status "Do not contact" --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 624dcda170a..8961d70a4cc 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1479,7 +1479,7 @@ class Societe extends CommonObject $sql .= ",fk_effectif = ".($this->effectif_id > 0 ? ((int) $this->effectif_id) : "null"); if (isset($this->stcomm_id)) { - $sql .= ",fk_stcomm=".($this->stcomm_id > 0 ? ((int) $this->stcomm_id) : "0"); + $sql .= ",fk_stcomm=".($this->stcomm_id >= -1 ? ((int) $this->stcomm_id) : "0"); } if (isset($this->typent_id)) { $sql .= ",fk_typent = ".($this->typent_id > 0 ? ((int) $this->typent_id) : "0"); From baccf336f20bea38699db1a803d1a7116e823c55 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 24 Oct 2022 16:41:31 +0200 Subject: [PATCH 2/3] FIX remove > 0 and -1 --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 8961d70a4cc..83de127f254 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1479,7 +1479,7 @@ class Societe extends CommonObject $sql .= ",fk_effectif = ".($this->effectif_id > 0 ? ((int) $this->effectif_id) : "null"); if (isset($this->stcomm_id)) { - $sql .= ",fk_stcomm=".($this->stcomm_id >= -1 ? ((int) $this->stcomm_id) : "0"); + $sql .= ",fk_stcomm=".(($this->stcomm_id > 0 || $this->stcomm_id = -1) ? ((int) $this->stcomm_id) : "0"); } if (isset($this->typent_id)) { $sql .= ",fk_typent = ".($this->typent_id > 0 ? ((int) $this->typent_id) : "0"); From 2281b187b7a1ed714aa62f2c078457cefda2f739 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 26 Oct 2022 12:15:30 +0200 Subject: [PATCH 3/3] FIX just add integer --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 83de127f254..7a8e1004468 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1479,7 +1479,7 @@ class Societe extends CommonObject $sql .= ",fk_effectif = ".($this->effectif_id > 0 ? ((int) $this->effectif_id) : "null"); if (isset($this->stcomm_id)) { - $sql .= ",fk_stcomm=".(($this->stcomm_id > 0 || $this->stcomm_id = -1) ? ((int) $this->stcomm_id) : "0"); + $sql .= ",fk_stcomm=".(int) $this->stcomm_id; } if (isset($this->typent_id)) { $sql .= ",fk_typent = ".($this->typent_id > 0 ? ((int) $this->typent_id) : "0");