$query.="WHERE cres.coll_id = 'letterbox_coll' AND cres.res_id = ? AND cast (c.contact_id as varchar(128)) = cres.contact_id AND c.ca_id = cres.address_id ";
$query.='GROUP BY c.firstname, c.lastname, c.society, c.contact_id, c.ca_id';
$query.='GROUP BY c.firstname, c.lastname, c.society, c.contact_id, c.ca_id, c.contact_firstname, c.contact_lastname, c.is_corporate_person';
$stmt=$db->query($query,array($res_id));
$nbContacts=0;
...
...
@@ -169,16 +169,24 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,