forked from Wavyzz/dolibarr
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')";
|
$sql .= " AND (datefin IS NULL AND t.subscription = '1')";
|
||||||
}
|
}
|
||||||
if ($search_filter == 'uptodate') {
|
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') {
|
if ($search_filter == 'outofdate') {
|
||||||
$sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = '1')";
|
$sql .= " AND (datefin < '".$db->idate($now)."')";
|
||||||
}
|
}
|
||||||
if ($search_status != '') {
|
if ($search_status != '') {
|
||||||
// Peut valoir un nombre ou liste de nombre separes par virgules
|
// 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);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
//print $sql;
|
||||||
|
|
||||||
// Complete request and execute it with limit
|
// Complete request and execute it with limit
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ if ($action == 'create') {
|
|||||||
print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : 'morphy');
|
print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : 'morphy');
|
||||||
print "</td></tr>";
|
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 $form->selectyesno("subscription", 1, 1);
|
||||||
print '</td></tr>';
|
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><td>'.$langs->trans("MembersNature").'</td><td class="valeur" >'.$object->getmorphylib($object->morphy).'</td>';
|
||||||
print '</tr>';
|
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 yn($object->subscription);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -8049,6 +8049,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
}
|
}
|
||||||
if (is_object($object) && $object->element == 'member') {
|
if (is_object($object) && $object->element == 'member') {
|
||||||
$typeforonlinepayment = 'member';
|
$typeforonlinepayment = 'member';
|
||||||
|
$amounttouse = 0;
|
||||||
|
if (!empty($object->last_subscription_amount)) {
|
||||||
|
$amounttouse = $object->last_subscription_amount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (is_object($object) && $object->element == 'contrat') {
|
if (is_object($object) && $object->element == 'contrat') {
|
||||||
$typeforonlinepayment = 'contract';
|
$typeforonlinepayment = 'contract';
|
||||||
@@ -8056,7 +8060,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
if (is_object($object) && $object->element == 'fichinter') {
|
if (is_object($object) && $object->element == 'fichinter') {
|
||||||
$typeforonlinepayment = 'ficheinter';
|
$typeforonlinepayment = 'ficheinter';
|
||||||
}
|
}
|
||||||
$url = getOnlinePaymentUrl(0, $typeforonlinepayment, $substitutionarray['__REF__']);
|
|
||||||
|
$url = getOnlinePaymentUrl(0, $typeforonlinepayment, $substitutionarray['__REF__'], $amounttouse);
|
||||||
$paymenturl = $url;
|
$paymenturl = $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ NoTypeDefinedGoToSetup=No member types defined. Go to menu "Members types"
|
|||||||
NewMemberType=New member type
|
NewMemberType=New member type
|
||||||
WelcomeEMail=Welcome email
|
WelcomeEMail=Welcome email
|
||||||
SubscriptionRequired=Contribution required
|
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
|
DeleteType=Delete
|
||||||
VoteAllowed=Vote allowed
|
VoteAllowed=Vote allowed
|
||||||
Physical=Individual
|
Physical=Individual
|
||||||
|
|||||||
Reference in New Issue
Block a user