noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 02/03: Bug #2099: GESTION : erreur SQL si fic


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/03: Bug #2099: GESTION : erreur SQL si fiche contact non trouvée
Date: Thu, 25 Nov 2021 08:22:56 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit f8d12ee7a646bd151f2056eac3b4118b0916755c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Nov 24 15:09:57 2021 +0100

    Bug #2099: GESTION : erreur SQL si fiche contact non trouvée
---
 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 6e0d0fb..fe7f464 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]