diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 5836bf48332..d443eb6e462 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -866,6 +866,18 @@ else $object->country_code=$tmparray['code']; $object->country=$tmparray['label']; } + + if (!empty($socid)) { +$object = new Societe($db); +if ($socid > 0) $object->fetch($socid); + +if (! ($object->id > 0)) +{ + $langs->load("errors"); + print($langs->trans('ErrorRecordNotFound')); + exit; +} + } $adht = new AdherentType($db); @@ -905,6 +917,7 @@ else print '
'; print ''; print ''; + print ''; if ($backtopage) print ''; dol_fiche_head('');