Update api_memberstypes.class.php

This commit is contained in:
ptibogxiv 2019-03-27 14:04:13 +01:00 committed by GitHub
parent 7a84cb1fc8
commit 22ea6fa0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,13 +101,13 @@ class MembersTypes extends DolibarrApi
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= ' WHERE t.entity IN ('.getEntity('member_type').')'; $sql.= ' WHERE t.entity IN ('.getEntity('member_type').')';
// Nature // Nature
if ($nature != 'all') { if ($nature != 'all') {
if ($nature == 'both') { if ($nature == 'both') {
$sql.= ' AND t.morphy IS NULL '; $sql.= ' AND t.morphy IS NULL ';
} else { } else {
$sql.= ' AND (t.morphy IS NULL OR t.morphy = "'.$nature.'")'; $sql.= ' AND (t.morphy IS NULL OR t.morphy = "'.$nature.'")';
} }
} }
// Add sql filters // Add sql filters