Bug #2099: GESTION : erreur SQL si fiche contact non trouvée

This commit is contained in:
sparkyx 2021-11-24 15:09:57 +01:00
parent d54d2bcdb6
commit f8d12ee7a6

View file

@ -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);