diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index f934ebcf0af..63deec867ef 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -29,7 +29,7 @@ $graphwidth = 700; $mapratio = 0.5; $graphheight = round($graphwidth * $mapratio); -$mode = GETPOST('mode') ?GETPOST('mode') : ''; +$mode = GETPOST('mode') ? GETPOST('mode') : ''; // Security check @@ -69,7 +69,7 @@ $sql .= " d.morphy as code"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."subscription as s ON s.fk_adherent = d.rowid"; $sql .= " WHERE d.entity IN (".getEntity('adherent').")"; -$sql .= " AND d.statut <> -1"; // Not draft +$sql .= " AND d.statut <> ".Adherent::STATUS_DRAFT; $sql .= " GROUP BY d.morphy"; $foundphy = $foundmor = 0; @@ -104,7 +104,7 @@ $sql .= " d.morphy as code"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."subscription as s ON s.fk_adherent = d.rowid"; $sql .= " WHERE d.entity IN (".getEntity('adherent').")"; -$sql .= " AND d.statut >= 1"; // Active (not draft=-1, not resiliated=0) +$sql .= " AND d.statut >= 1"; // Active (not excluded=-2, not draft=-1, not resiliated=0) $sql .= " GROUP BY d.morphy"; $foundphy = $foundmor = 0;