Fix filter on member without subscription

This commit is contained in:
Laurent Destailleur 2022-10-15 13:41:15 +02:00
parent 54c5ca7c75
commit 63a62edcf6
2 changed files with 2 additions and 2 deletions

View File

@ -365,7 +365,7 @@ if ($search_type > 0) {
$sql .= " AND t.rowid=".((int) $search_type);
}
if ($search_filter == 'withoutsubscription') {
$sql .= " AND (datefin IS NULL OR t.subscription = '0')";
$sql .= " AND (datefin IS NULL)";
}
if ($search_filter == 'uptodate') {
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')";

View File

@ -359,7 +359,7 @@ foreach ($search as $key => $val) {
}
if ($managedfor == 'member') {
if ($search_filter == 'withoutsubscription') {
$sql .= " AND (d.datefin IS NULL OR dty.subscription = 0)";
$sql .= " AND (d.datefin IS NULL)";
}
if ($search_filter == 'uptodate') {
$sql .= " AND (d.datefin >= '".$db->idate($now)."' OR dty.subscription = 0)";