Skip to content

Commit

Permalink
Merge pull request #7886 from ptibogxiv/patch-8
Browse files Browse the repository at this point in the history
Fix for multicompany
  • Loading branch information
eldy committed Nov 29, 2017
2 parents 9fa6bfd + c194538 commit acd2d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/modules/mailings/fraise.modules.php
Expand Up @@ -203,7 +203,7 @@ function add_to_target($mailing_id,$filtersarray=array())
$sql.= " a.lastname, a.firstname,";
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
$sql.= " WHERE a.email <> ''"; // Note that null != '' is false
$sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND a.datefin >= '".$this->db->idate($now)."'";
Expand Down

0 comments on commit acd2d01

Please sign in to comment.