Commit ed1759b7 authored by Kevin Cristiano's avatar Kevin Cristiano 🌎

Add criteria to include maxage

parent 4182e2a2
......@@ -141,8 +141,9 @@ class CRM_Agegendersearch_Form_Search_AgeGender extends CRM_Contact_Form_Search_
$maxAge = CRM_Utils_Array::value('max_age',
$this->_formValues
);
$maxAged = $maxAge + 1 ;
if ( $maxAge != NULL ) {
$params[$count] = array(date("Y-m-d", strtotime("now - {$maxAge} year")), 'String');
$params[$count] = array(date("Y-m-d", strtotime("now - {$maxAged} year")), 'String');
$clause[] = "contact_a.birth_date >= %{$count}";
$count++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment