diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index f71fa705c3f..999c275368d 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2470,19 +2470,19 @@ class Adherent extends CommonObject } elseif ($status >= self::STATUS_VALIDATED) { if ($need_subscription === 0) { $statusType = 'status4'; - $labelStatus = $langs->trans("MemberStatusNoSubscription"); + $labelStatus = $langs->trans("Validated").' - '.$langs->trans("MemberStatusNoSubscription"); $labelStatusShort = $langs->trans("MemberStatusNoSubscriptionShort"); } elseif (!$date_end_subscription) { $statusType = 'status1'; - $labelStatus = $langs->trans("WaitingSubscription"); + $labelStatus = $langs->trans("Validated").' - '.$langs->trans("WaitingSubscription"); $labelStatusShort = $langs->trans("WaitingSubscriptionShort"); } elseif ($date_end_subscription < dol_now()) { // expired $statusType = 'status8'; - $labelStatus = $langs->trans("MemberStatusActiveLate"); + $labelStatus = $langs->trans("Validated").' - '.$langs->trans("MemberStatusActiveLate"); $labelStatusShort = $langs->trans("MemberStatusActiveLateShort"); } else { $statusType = 'status4'; - $labelStatus = $langs->trans("MemberStatusPaid"); + $labelStatus = $langs->trans("Validated").' - '.$langs->trans("MemberStatusPaid"); $labelStatusShort = $langs->trans("MemberStatusPaidShort"); } } elseif ($status == self::STATUS_RESILIATED) { diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 47bded0df29..f99b6c0aef4 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -72,12 +72,14 @@ $search_phone_perso = GETPOST("search_phone_perso", 'alpha'); $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); $search_type = GETPOST("search_type", 'alpha'); $search_email = GETPOST("search_email", 'alpha'); -$search_categ = GETPOSTINT("search_categ"); +$search_categ = GETPOST("search_categ", 'intcomma'); $search_morphy = GETPOST("search_morphy", 'alpha'); $search_import_key = trim(GETPOST("search_import_key", 'alpha')); -$catid = GETPOSTINT("catid"); $socid = GETPOSTINT('socid'); +if (GETPOSTINT('catid') && empty($search_categ)) { + $search_categ = GETPOSTINT('catid'); +} $search_filter = GETPOST("search_filter", 'alpha'); $search_status = GETPOST("search_status", 'intcomma'); // status @@ -400,7 +402,7 @@ $morecss = array(); // Build and execute select // -------------------------------------------------------------------- -if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) { +if (!empty($search_categ) && $search_categ > 0) { $sql = "SELECT DISTINCT"; } else { $sql = "SELECT"; @@ -443,10 +445,6 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on (s.rowid = d.fk_soc)"; $sql .= ", ".MAIN_DB_PREFIX."adherent_type as t"; $sql .= " WHERE d.fk_adherent_type = t.rowid"; -if ($catid && empty($search_categ)) { - $search_categ = $catid; -} - $searchCategoryContactList = $search_categ ? array($search_categ) : array(); $searchCategoryContactOperator = 0; // Search for tag/category ($searchCategoryContactList is an array of ID) @@ -492,6 +490,8 @@ if ($search_filter == 'waitingsubscription') { $sql .= " AND (datefin IS NULL AND t.subscription = '1')"; } if ($search_filter == 'uptodate') { + //$sql .= " AND (datefin >= '".$db->idate($now)."')"; + // Up to date subscription OR no subscription required $sql .= " AND (datefin >= '".$db->idate($now)."' OR (datefin IS NULL AND t.subscription = '0'))"; } if ($search_filter == 'outofdate') { @@ -1207,12 +1207,11 @@ while ($i < $imaxinloop) { $memberstatic->id = $obj->rowid; $memberstatic->ref = $obj->ref; - $memberstatic->civility_id = $obj->civility; + $memberstatic->civility_code = $obj->civility; $memberstatic->login = $obj->login; $memberstatic->lastname = $obj->lastname; $memberstatic->firstname = $obj->firstname; $memberstatic->gender = $obj->gender; - $memberstatic->statut = $obj->status; $memberstatic->status = $obj->status; $memberstatic->datefin = $datefin; $memberstatic->socid = $obj->fk_soc; @@ -1288,10 +1287,10 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - // Civility + // Title/Civility if (!empty($arrayfields['d.civility']['checked'])) { print "