Note it also applies to membership_status_id but the lack of a uniquename makes the fix trickier so I'm reluctant to target the
rc
if (isset($fields[$fieldName]['unique_title'])) {
$props['label'] = $fields[$fieldName]['unique_title'];
}
+ elseif (isset($fields[$fieldName]['html']['label'])) {
+ $props['label'] = $fields[$fieldName]['html']['label'];
+ }
elseif (isset($fields[$fieldName]['title'])) {
$props['label'] = $fields[$fieldName]['title'];
}
'membership_join_date',
'membership_start_date',
'membership_end_date',
+ 'membership_type_id',
];
$metadata = civicrm_api3('Membership', 'getfields', [])['values'];
return array_intersect_key($metadata, array_flip($fields));
* Build the search form.
*
* @param CRM_Core_Form $form
+ *
+ * @throws \CiviCRM_API3_Exception
*/
public static function buildSearchForm(&$form) {
$form->addSearchFieldMetadata(['Membership' => self::getSearchFieldMetadata()]);
'class' => 'crm-select2',
]);
- $form->addEntityRef('membership_type_id', ts('Membership Type'), [
- 'entity' => 'MembershipType',
- 'multiple' => TRUE,
- 'placeholder' => ts('- any -'),
- 'select' => ['minimumInputLength' => 0],
- ]);
-
$form->addElement('text', 'member_source', ts('Source'));
$form->add('number', 'membership_id', ts('Membership ID'), ['class' => 'four', 'min' => 1]);
*
* Generated from xml/schema/CRM/Member/Membership.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:15846e936cabb40c951fc8bc37c6f79a)
+ * (GenCodeChecksum:8a676a436711b85a6c7228e6566a12fc)
*/
/**
'FKClassName' => 'CRM_Member_DAO_MembershipType',
'html' => [
'type' => 'Select',
+ 'label' => ts("Membership Type"),
],
'pseudoconstant' => [
'table' => 'civicrm_membership_type',
foreach ($membershipSummary as $typeID => $details) {
if (!$isCurrentMonth) {
$membershipSummary[$typeID]['total']['total']['url'] = CRM_Utils_System::url('civicrm/member/search',
- "reset=1&force=1&start=&end=$ymd&status=$status&type=$typeID"
+ "reset=1&force=1&start=&end=$ymd&status=$status&membership_type_id=$typeID"
);
- $membershipSummary[$typeID]['total_owner']['total_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&start=&end=$ymd&status=$status&type=$typeID&owner=1");
+ $membershipSummary[$typeID]['total_owner']['total_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&start=&end=$ymd&status=$status&membership_type_id=$typeID&owner=1");
}
else {
$membershipSummary[$typeID]['total']['total']['url'] = CRM_Utils_System::url('civicrm/member/search',
);
$membershipSummary[$typeID]['total_owner']['total_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&owner=1");
}
- $membershipSummary[$typeID]['current']['total']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID");
- $membershipSummary[$typeID]['current_owner']['current_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&type=$typeID&owner=1");
+ $membershipSummary[$typeID]['current']['total']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&membership_type_id=$typeID");
+ $membershipSummary[$typeID]['current_owner']['current_owner']['url'] = CRM_Utils_System::url('civicrm/member/search', "reset=1&force=1&status=$status&membership_type_id=$typeID&owner=1");
}
- $totalCount = array();
+ $totalCount = [];
$newCountPreMonth = $newCountMonth = $newCountYear = 0;
$renewCountPreMonth = $renewCountMonth = $renewCountYear = 0;
</pseudoconstant>
<html>
<type>Select</type>
+ <label>Membership Type</label>
</html>
<add>1.5</add>
</field>