From f8d12ee7a646bd151f2056eac3b4118b0916755c Mon Sep 17 00:00:00 2001 From: sparkyx Date: Wed, 24 Nov 2021 15:09:57 +0100 Subject: [PATCH] =?UTF-8?q?Bug=20#2099:=20GESTION=20:=20erreur=20SQL=20si?= =?UTF-8?q?=20fiche=20contact=20non=20trouv=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class/follow_up.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index 6e0d0fb76..fe7f46426 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -804,14 +804,14 @@ class Follow_Up else { $tiers=new Fiche($this->db); - if ($tiers->get_by_qcode($this->qcode_dest)==-1) // Error we cannot retrieve this qcode - return false; + if ($tiers->get_by_qcode($this->qcode_dest)== 1) // Error we cannot retrieve this qcode + $this->f_id_dest=null; // internal document else $this->f_id_dest=$tiers->id; } $contact=new Fiche($this->db); - if ($contact->get_by_qcode($this->ag_contact)==-1) - $contact->id=0; + if ($contact->get_by_qcode($this->ag_contact)== 1) + $contact->id=null; // reload the old one $old=new Follow_Up($this->db);