mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-08 18:48:22 +01:00
FIX Filter on member status
This commit is contained in:
@@ -424,10 +424,10 @@ if ($search_filter == 'waitingsubscription') {
|
||||
$sql .= " AND (datefin IS NULL AND t.subscription = '1')";
|
||||
}
|
||||
if ($search_filter == 'uptodate') {
|
||||
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')";
|
||||
$sql .= " AND (datefin >= '".$db->idate($now)."' OR (datefin IS NULL AND t.subscription = '0'))";
|
||||
}
|
||||
if ($search_filter == 'outofdate') {
|
||||
$sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = '1')";
|
||||
$sql .= " AND (datefin < '".$db->idate($now)."')";
|
||||
}
|
||||
if ($search_status != '') {
|
||||
// Peut valoir un nombre ou liste de nombre separes par virgules
|
||||
@@ -516,6 +516,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
//print $sql;
|
||||
|
||||
// Complete request and execute it with limit
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
@@ -433,7 +433,7 @@ if ($action == 'create') {
|
||||
print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : 'morphy');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("SubscriptionRequired"), $langs->trans("SubscriptionRequiredDesc")).'</td><td>';
|
||||
print $form->selectyesno("subscription", 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -509,7 +509,7 @@ if ($rowid > 0) {
|
||||
print '<tr><td>'.$langs->trans("MembersNature").'</td><td class="valeur" >'.$object->getmorphylib($object->morphy).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("SubscriptionRequired"), $langs->trans("SubscriptionRequiredDesc")).'</td><td>';
|
||||
print yn($object->subscription);
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -8049,6 +8049,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
}
|
||||
if (is_object($object) && $object->element == 'member') {
|
||||
$typeforonlinepayment = 'member';
|
||||
$amounttouse = 0;
|
||||
if (!empty($object->last_subscription_amount)) {
|
||||
$amounttouse = $object->last_subscription_amount;
|
||||
}
|
||||
}
|
||||
if (is_object($object) && $object->element == 'contrat') {
|
||||
$typeforonlinepayment = 'contract';
|
||||
@@ -8056,7 +8060,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
if (is_object($object) && $object->element == 'fichinter') {
|
||||
$typeforonlinepayment = 'ficheinter';
|
||||
}
|
||||
$url = getOnlinePaymentUrl(0, $typeforonlinepayment, $substitutionarray['__REF__']);
|
||||
|
||||
$url = getOnlinePaymentUrl(0, $typeforonlinepayment, $substitutionarray['__REF__'], $amounttouse);
|
||||
$paymenturl = $url;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ NoTypeDefinedGoToSetup=No member types defined. Go to menu "Members types"
|
||||
NewMemberType=New member type
|
||||
WelcomeEMail=Welcome email
|
||||
SubscriptionRequired=Contribution required
|
||||
SubscriptionRequiredDesc=If subscription is required, a subscription with a start or end date must be recorded to have the member up to date (whatever is subscription amount, even if subscription is free).
|
||||
DeleteType=Delete
|
||||
VoteAllowed=Vote allowed
|
||||
Physical=Individual
|
||||
|
||||
Reference in New Issue
Block a user