$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
$to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
- $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
+ $clause = $this->dateClause($field['dbAlias'], $relative, $from, $to, $field['type']);
}
else {
$op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params);
";
$dao = CRM_Core_DAO::executeQuery($sql);
+ $amount = $avg = array();
while ($dao->fetch()) {
$amount[] = CRM_Utils_Money::format($dao->amount, $dao->currency);
$avg[] = CRM_Utils_Money::format(round(($dao->amount /
$last_primary = NULL;
foreach ($rows as $rowNum => $row) {
+ //handle gender
+ if (array_key_exists('civicrm_contact_gender_id', $row)) {
+ if ($value = $row['civicrm_contact_gender_id']) {
+ $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
+ $row['civicrm_contact_gender_id'] = $rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value];
+ }
+ $entryFound = TRUE;
+ }
+
// Highlight primary contact and amount row
if (is_numeric($rowNum) ||
($last_primary && ($rowNum == "{$last_primary}_total"))
$rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts("View Contribution Details for this Contact.");
}
- //handle gender
- if (array_key_exists('civicrm_contact_gender_id', $row)) {
- if ($value = $row['civicrm_contact_gender_id']) {
- $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
- $rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value];
- }
- $entryFound = TRUE;
- }
-
// display birthday in the configured custom format
if (array_key_exists('civicrm_contact_birth_date', $row)) {
$birthDate = $row['civicrm_contact_birth_date'];
'name' => 'sort_name',
'title' => ts('Soft Credit Name'),
),
- 'id' => array(
- 'title' => ts('Contact ID'),
- 'no_display' => TRUE,
- ),
'gender_id' => array(
'title' => ts('Gender'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'title' => ts('Contact Subtype'),
),
),
+ 'filters' => array(
+ 'gender_id' => array(
+ 'title' => ts('Gender'),
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
+ ),
+ ),
),
);
$this->_columns += $this->getAddressColumns();
'title' => ts('Contact ID'),
'no_display' => TRUE,
),
- 'gender_id' => array(
- 'title' => ts('Gender'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
- ),
'birth_date' => array(
'title' => ts('Birth Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
{if $row.$field eq 'Subtotal'}
{$row.$field}
- {elseif $header.type eq 12}
+ {elseif $header.type eq 12 || $header.type eq 4}
{if $header.group_by eq 'MONTH' or $header.group_by eq 'QUARTER'}
{$row.$field|crmDate:$config->dateformatPartial}
{elseif $header.group_by eq 'YEAR'}