mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix label for date of end of membership
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 "<td>";
|
||||
print $obj->civility;
|
||||
print dol_escape_htmltag($obj->civility);
|
||||
print "</td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1364,7 +1363,7 @@ while ($i < $imaxinloop) {
|
||||
// Address
|
||||
if (!empty($arrayfields['d.address']['checked'])) {
|
||||
print '<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).'">';
|
||||
print $obj->address;
|
||||
print dol_escape_htmltag($obj->address);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1373,7 +1372,7 @@ while ($i < $imaxinloop) {
|
||||
// Zip
|
||||
if (!empty($arrayfields['d.zip']['checked'])) {
|
||||
print '<td class="nocellnopadd">';
|
||||
print $obj->zip;
|
||||
print dol_escape_htmltag($obj->zip);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1382,7 +1381,7 @@ while ($i < $imaxinloop) {
|
||||
// Town
|
||||
if (!empty($arrayfields['d.town']['checked'])) {
|
||||
print '<td class="nocellnopadd">';
|
||||
print $obj->town;
|
||||
print dol_escape_htmltag($obj->town);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1390,7 +1389,9 @@ while ($i < $imaxinloop) {
|
||||
}
|
||||
// State / County / Departement
|
||||
if (!empty($arrayfields['state.nom']['checked'])) {
|
||||
print "<td>".$obj->state_name."</td>\n";
|
||||
print "<td>";
|
||||
print dol_escape_htmltag($obj->state_name);
|
||||
print "</td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@@ -1408,7 +1409,7 @@ while ($i < $imaxinloop) {
|
||||
// Phone pro
|
||||
if (!empty($arrayfields['d.phone']['checked'])) {
|
||||
print '<td class="nocellnopadd">';
|
||||
print $obj->phone;
|
||||
print dol_print_phone($obj->phone);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1417,7 +1418,7 @@ while ($i < $imaxinloop) {
|
||||
// Phone perso
|
||||
if (!empty($arrayfields['d.phone_perso']['checked'])) {
|
||||
print '<td class="nocellnopadd">';
|
||||
print $obj->phone_perso;
|
||||
print dol_print_phone($obj->phone_perso);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1426,7 +1427,7 @@ while ($i < $imaxinloop) {
|
||||
// Phone mobile
|
||||
if (!empty($arrayfields['d.phone_mobile']['checked'])) {
|
||||
print '<td class="nocellnopadd">';
|
||||
print $obj->phone_mobile;
|
||||
print dol_print_phone($obj->phone_mobile);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@@ -1444,23 +1445,25 @@ while ($i < $imaxinloop) {
|
||||
// End of subscription date
|
||||
$datefin = $db->jdate($obj->datefin);
|
||||
if (!empty($arrayfields['d.datefin']['checked'])) {
|
||||
print '<td class="nowraponall center">';
|
||||
$s = '';
|
||||
if ($datefin) {
|
||||
print dol_print_date($datefin, 'day');
|
||||
$s .= dol_print_date($datefin, 'day');
|
||||
if ($memberstatic->hasDelay()) {
|
||||
$textlate = ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).' '.$langs->trans("days").')';
|
||||
print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
|
||||
$s .= " ".img_warning($langs->trans("SubscriptionLate").$textlate);
|
||||
}
|
||||
} else {
|
||||
if (!empty($obj->subscription)) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SubscriptionNotReceived").'</span>';
|
||||
$s .= '<span class="opacitymedium">'.$langs->trans("SubscriptionNotReceived").'</span>';
|
||||
if ($obj->status > 0) {
|
||||
print " ".img_warning();
|
||||
$s .= " ".img_warning();
|
||||
}
|
||||
} else {
|
||||
print ' ';
|
||||
$s .= '<span class="opacitymedium">'.$langs->trans("SubscriptionNotNeeded").'</span>';
|
||||
}
|
||||
}
|
||||
print '<td class="nowraponall center tdoverflowmax150" title="'.dolPrintHTMLForAttribute(dol_string_nohtmltag($s)).'">';
|
||||
print $s;
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
Reference in New Issue
Block a user