$query_status="SELECT ct.label FROM res_view_letterbox r LEFT JOIN contacts_v2 c ON c.contact_id = r.contact_id LEFT JOIN contact_types ct ON ct.id = c.contact_type WHERE r.res_id = ##res_id## ";
$query_status="SELECT DISTINCT u.lastname, u.firstname FROM res_view_attachments r LEFT JOIN users u ON u.user_id = r.typist WHERE r.attachment_type = 'signed_response' and r.status = 'TRA' and r.res_id_master = ##res_id## ";
$query_status="SELECT creation_date FROM res_view_attachments r WHERE r.attachment_type = 'signed_response' and r.status = 'TRA' and r.res_id_master = ##res_id## ";