diff --git a/CRM/Member/BAO/Query.php b/CRM/Member/BAO/Query.php index 8aa59ff86fe0..1928588197fc 100644 --- a/CRM/Member/BAO/Query.php +++ b/CRM/Member/BAO/Query.php @@ -307,6 +307,12 @@ public static function whereClauseSingle(&$values, &$query) { $query->_tables['civicrm_membership'] = $query->_whereTables['civicrm_membership'] = 1; return; + case 'member_is_override': + $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_membership.is_override", $op, $value, "Boolean"); + $query->_qill[$grouping][] = $value ? ts("Is Membership Status overriden? Yes") : ts("Is Membership Status overriden? No"); + $query->_tables['civicrm_membership'] = $query->_whereTables['civicrm_membership'] = 1; + return; + case 'member_campaign_id': if (CRM_Utils_Array::value($op, $value)) { $value = $value[$op]; @@ -396,6 +402,7 @@ public static function defaultReturnProperties( 'max_related' => 1, 'membership_recur_id' => 1, 'member_campaign_id' => 1, + 'member_is_override' => 1, ); if ($includeCustomFields) { @@ -444,6 +451,7 @@ public static function buildSearchForm(&$form) { $form->addYesNo('member_pay_later', ts('Pay Later?'), TRUE); $form->addYesNo('member_auto_renew', ts('Auto-Renew?'), TRUE); $form->addYesNo('member_test', ts('Membership is a Test?'), TRUE); + $form->addYesNo('member_is_override', ts('Membership Status Is Override?'), TRUE); // add all the custom searchable fields $extends = array('Membership'); diff --git a/templates/CRM/Member/Form/Search.hlp b/templates/CRM/Member/Form/Search.hlp index 16a6dac0ebd0..7b30034b5c71 100644 --- a/templates/CRM/Member/Form/Search.hlp +++ b/templates/CRM/Member/Form/Search.hlp @@ -33,3 +33,13 @@
{$form.member_auto_renew.label} {$form.member_auto_renew.html}
++ {$form.member_is_override.label} + {help id="id-member_is_override" file="CRM/Member/Form/Search.hlp"} + {$form.member_is_override.html} +