FIX: Contacts are not added to the list with the status "no contact"
This commit is contained in:
parent
ba4f306c83
commit
3c5903f75a
@ -203,9 +203,9 @@ class MailingTargets // This can't be abstract as it is used for some method
|
|||||||
//Update the status to show contact mail that don't want to be contacted anymore'
|
//Update the status to show contact mail that don't want to be contacted anymore'
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
||||||
$sql .= " SET statut=3";
|
$sql .= " SET statut=3";
|
||||||
$sql .= " WHERE fk_mailing=".$mailing_id." AND email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc ";
|
$sql .= " WHERE fk_mailing=".$mailing_id." AND source_type='contact' AND (email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc ";
|
||||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.fk_stcomm=-1 AND s.rowid=sc.fk_soc)";
|
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.fk_stcomm=-1 AND s.rowid=sc.fk_soc)";
|
||||||
$sql .= " AND source_type='contact'";
|
$sql .= " OR no_email=1)";
|
||||||
$result=$this->db->query($sql);
|
$result=$this->db->query($sql);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::add_to_target: mailing update status to display contact mail that do not want to be contacted sql:".$sql);
|
dol_syslog(get_class($this)."::add_to_target: mailing update status to display contact mail that do not want to be contacted sql:".$sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user