Skip to content
Snippets Groups Projects
Commit b6bdda5e authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX change is_integer to is_numeric (mailing) + fix sql

parent 49d55503
No related branches found
No related tags found
No related merge requests found
......@@ -310,7 +310,7 @@ abstract class attachments_controler_Abstract
WHERE cr.res_id = ? and cast(c.contact_id as char) = cast(cr.contact_id as char) and ca.contact_id=c.contact_id and ca.id=cr.address_id", array($_SESSION['doc_id']));
$i=0;
while ($multi_contacts_attachment = $stmt->fetchObject()) {
if (is_integer($multi_contacts_attachment->contact_id)) {
if (is_numeric($multi_contacts_attachment->contact_id)) {
$format_contact='';
$stmt2 = $db->query('SELECT is_corporate_person, is_private, contact_lastname, contact_firstname, society, society_short, address_num, address_street, address_town, lastname, firstname
FROM view_contacts
......
......@@ -276,7 +276,7 @@ abstract class visa_Abstract extends Database
$db = new Database();
if (empty($noSignableAttachments)) {
$stmt = $db->query("SELECT * FROM res_view_attachments WHERE res_id_master = ? AND coll_id = ? AND status NOT IN ('DEL','OBS','TMP') IN in_signature_book = ?", [$res_id, $coll_id, true]);
$stmt = $db->query("SELECT * FROM res_view_attachments WHERE res_id_master = ? AND coll_id = ? AND status NOT IN ('DEL','OBS','TMP') AND in_signature_book = ?", [$res_id, $coll_id, true]);
} else {
$stmt = $db->query("SELECT * FROM res_view_attachments WHERE res_id_master = ? AND coll_id = ? AND status NOT IN ('DEL','OBS','TMP') AND attachment_type NOT IN (?) AND in_signature_book = ? ", [$res_id, $coll_id, $noSignableAttachments, true]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment