4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.5 |
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2014 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
32 * @copyright CiviCRM LLC (c) 2004-2014
36 class CRM_Report_Form_Contribute_History
extends CRM_Report_Form
{
37 // Primary Contacts count limitCONSTROW_COUNT_LIMIT = 10;
39 protected $_addressField = FALSE;
40 protected $_emailField = FALSE;
41 protected $_phoneField = FALSE;
42 protected $_relationshipColumns = array();
44 protected $_customGroupExtends = array('Contribution');
46 protected $_referenceYear = array(
50 protected $_yearStatisticsFrom = '';
52 protected $_yearStatisticsTo = '';
60 function __construct() {
62 $date = CRM_Core_SelectValues
::date('custom', NULL, $yearsInPast, 0);
63 $count = $date['maxYear'];
64 $optionYear = array('' => ts('-- select --'));
66 $this->_yearStatisticsFrom
= $date['minYear'];
67 $this->_yearStatisticsTo
= $date['maxYear'];
69 while ($date['minYear'] <= $count) {
70 $optionYear[$date['minYear']] = $date['minYear'];
74 $relationTypeOp = array();
75 $relationshipTypes = CRM_Core_PseudoConstant
::relationshipType();
76 foreach ($relationshipTypes as $rid => $rtype) {
77 if ($rtype['label_a_b'] != $rtype['label_b_a']) {
78 $relationTypeOp[$rid] = "{$rtype['label_a_b']}/{$rtype['label_b_a']}";
81 $relationTypeOp[$rid] = $rtype['label_a_b'];
85 $this->_columns
= array(
88 'dao' => 'CRM_Contact_DAO_Contact',
92 array('title' => ts('Contact Name'),
105 'title' => ts('Contact Type'),
107 'contact_sub_type' =>
109 'title' => ts('Contact SubType'),
112 'grouping' => 'contact-fields',
116 array('title' => ts('Contact Name')),
118 array('title' => ts('Contact ID'),
119 'no_display' => TRUE,
125 'dao' => 'CRM_Core_DAO_Email',
129 array('title' => ts('Email'),
133 'grouping' => 'contact-fields',
137 'dao' => 'CRM_Core_DAO_Phone',
141 array('title' => ts('Phone'),
145 'grouping' => 'contact-fields',
147 ) +
$this->addAddressFields(FALSE, FALSE, FALSE, array(
148 )) +
array('civicrm_relationship' =>
150 'dao' => 'CRM_Contact_DAO_Relationship',
153 'relationship_type_id' =>
154 array('title' => ts('Relationship Type'),
158 array('no_display' => TRUE),
160 array('no_display' => TRUE),
164 'relationship_type_id' =>
165 array('title' => ts('Relationship Type'),
166 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
167 'options' => $relationTypeOp,
168 'type' => CRM_Utils_Type
::T_STRING
,
173 'civicrm_contribution' =>
175 'dao' => 'CRM_Contribute_DAO_Contribution',
179 array('title' => ts('Amount Statistics'),
182 'no_display' => TRUE,
184 array('sum' => ts('Aggregate Amount')),
190 'no_display' => TRUE,
193 'grouping' => 'contri-fields',
198 'title' => ts('This Year'),
199 'operatorType' => CRM_Report_Form
::OP_SELECT
,
200 'options' => $optionYear,
205 'title' => ts('Other Years'),
206 'operatorType' => CRM_Report_Form
::OP_SELECT
,
207 'options' => $optionYear,
211 array('operatorType' => CRM_Report_Form
::OP_DATE
),
212 'contribution_status_id' =>
213 array('title' => ts('Donation Status'),
214 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
215 'options' => CRM_Contribute_PseudoConstant
::contributionStatus(),
216 'default' => array(1),
218 'financial_type_id' => array(
219 'title' => ts('Financial Type'),
220 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
221 'options' => CRM_Contribute_PseudoConstant
::financialType(),
224 array('title' => ts('Donation Amount'),
227 array('title' => ts('Aggregate Amount'),
228 'type' => CRM_Report_Form
::OP_INT
,
229 'dbAlias' => 'civicrm_contribution_total_amount_sum',
237 'dao' => 'CRM_Contact_DAO_GroupContact',
243 'name' => 'group_id',
244 'title' => ts('Group'),
245 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
247 'options' => CRM_Core_PseudoConstant
::group(),
253 $this->_columns
['civicrm_contribution']['fields']['civicrm_upto_' . $this->_yearStatisticsFrom
] = array('title' => ts('Up To %1 Donation', array(1 => $this->_yearStatisticsFrom
)),
255 'type' => CRM_Utils_Type
::T_MONEY
,
256 'is_statistics' => TRUE,
259 $yearConter = $this->_yearStatisticsFrom
;
261 while ($yearConter <= $this->_yearStatisticsTo
) {
262 $this->_columns
['civicrm_contribution']['fields'][$yearConter] = array('title' => ts('%1 Donation', array(1 => $yearConter)),
264 'type' => CRM_Utils_Type
::T_MONEY
,
265 'is_statistics' => TRUE,
270 $this->_columns
['civicrm_contribution']['fields']['aggregate_amount'] = array('title' => ts('Aggregate Amount'),
271 'type' => CRM_Utils_Type
::T_MONEY
,
272 'is_statistics' => TRUE,
275 $this->_tagFilter
= TRUE;
276 parent
::__construct();
279 function preProcess() {
280 parent
::preProcess();
285 $this->_columnHeaders
= array();
287 foreach ($this->_columns
as $tableName => $table) {
288 if (array_key_exists('fields', $table)) {
289 foreach ($table['fields'] as $fieldName => $field) {
291 if (!empty($field['required']) ||
!empty($this->_params
['fields'][$fieldName])) {
292 if ($tableName == 'civicrm_address') {
293 $this->_addressField
= TRUE;
295 if ($tableName == 'civicrm_email') {
296 $this->_emailField
= TRUE;
298 if ($tableName == 'civicrm_phone') {
299 $this->_phoneField
= TRUE;
301 if ($tableName == 'civicrm_relationship') {
302 $this->_relationshipColumns
["{$tableName}_{$fieldName}"] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
303 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
304 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = $field['title'];
308 if (!empty($field['is_statistics'])) {
309 $this->_columnHeaders
[$fieldName]['type'] = $field['type'];
310 $this->_columnHeaders
[$fieldName]['title'] = $field['title'];
313 elseif ($fieldName == 'receive_date') {
314 if ((CRM_Utils_Array
::value('this_year_op', $this->_params
) == 'fiscal' && !empty($this->_params
['this_year_value'])) ||
315 (CRM_Utils_Array
::value('other_year_op', $this->_params
== 'fiscal') && !empty($this->_params
['other_year_value']))){
316 $select[] = self
::fiscalYearOffset($field['dbAlias']) . " as {$tableName}_{$fieldName}";
318 $select[] = " YEAR(".$field['dbAlias'].")" . " as {$tableName}_{$fieldName}";
321 elseif ($fieldName == 'total_amount') {
322 $select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}";
325 $select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
326 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
327 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = $field['title'];
329 if (!empty($field['no_display'])) {
330 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['no_display'] = TRUE;
337 $this->_select
= "SELECT " . implode(', ', $select) . " ";
342 FROM civicrm_contact {$this->_aliases['civicrm_contact']}
343 INNER JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
344 ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_contribution']}.contact_id AND
345 {$this->_aliases['civicrm_contribution']}.is_test = 0 ";
347 if ($this->_emailField
) {
348 $this->_from
.= " LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']}
349 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND
350 {$this->_aliases['civicrm_email']}.is_primary = 1) ";
353 if ($this->_phoneField
) {
354 $this->_from
.= " LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
355 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND
356 {$this->_aliases['civicrm_phone']}.is_primary = 1) ";
359 $relContacAlias = 'contact_relationship';
360 $this->_relationshipFrom
= " INNER JOIN civicrm_relationship {$this->_aliases['civicrm_relationship']}
361 ON (({$this->_aliases['civicrm_relationship']}.contact_id_a = {$relContacAlias}.id OR {$this->_aliases['civicrm_relationship']}.contact_id_b = {$relContacAlias}.id ) AND {$this->_aliases['civicrm_relationship']}.is_active = 1) ";
363 if ($this->_addressField
) {
365 LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
366 ON {$this->_aliases['civicrm_contact']}.id =
367 {$this->_aliases['civicrm_address']}.contact_id AND
368 {$this->_aliases['civicrm_address']}.is_primary = 1\n";
373 $whereClauses = $havingClauses = $relationshipWhere = array();
374 $this->_relationshipWhere
= '';
375 $this->_statusClause
= '';
377 foreach ($this->_columns
as $tableName => $table) {
378 if (array_key_exists('filters', $table)) {
379 foreach ($table['filters'] as $fieldName => $field) {
381 if ($fieldName == 'this_year' ||
$fieldName == 'other_year') {
383 }elseif (CRM_Utils_Array
::value('type', $field) & CRM_Utils_Type
::T_DATE
) {
384 $relative = CRM_Utils_Array
::value("{$fieldName}_relative", $this->_params
);
385 $from = CRM_Utils_Array
::value("{$fieldName}_from", $this->_params
);
386 $to = CRM_Utils_Array
::value("{$fieldName}_to", $this->_params
);
388 $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
391 $op = CRM_Utils_Array
::value("{$fieldName}_op", $this->_params
);
393 $clause = $this->whereClause($field,
395 CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
),
396 CRM_Utils_Array
::value("{$fieldName}_min", $this->_params
),
397 CRM_Utils_Array
::value("{$fieldName}_max", $this->_params
)
402 if (!empty($clause)) {
403 if ($tableName == 'civicrm_relationship') {
404 $relationshipWhere[] = $clause;
408 if ($fieldName == 'contribution_status_id') {
409 $this->_statusClause
= " AND " . $clause;
412 if (!empty($field['having'])) {
413 $havingClauses[] = $clause;
416 $whereClauses[] = $clause;
423 if (empty($whereClauses)) {
424 $this->_where
= "WHERE ( 1 ) ";
428 $this->_where
= "WHERE " . implode(' AND ', $whereClauses);
431 if ($this->_aclWhere
) {
432 $this->_where
.= " AND {$this->_aclWhere} ";
435 if (!empty($havingClauses)) {
436 // use this clause to construct group by clause.
437 $this->_having
= "HAVING " . implode(' AND ', $havingClauses);
440 if (!empty($relationshipWhere)) {
441 $this->_relationshipWhere
= ' AND ' . implode(' AND ', $relationshipWhere);
446 $this->_groupBy
= "GROUP BY {$this->_aliases['civicrm_contribution']}.contact_id, YEAR({$this->_aliases['civicrm_contribution']}.receive_date)";
449 //Override to set limit is 10
451 * @param int $rowCount
453 function limit($rowCount = self
::ROW_COUNT_LIMIT
) {
454 parent
::limit($rowCount);
457 //Override to set pager with limit is 10
459 * @param int $rowCount
461 function setPager($rowCount = self
::ROW_COUNT_LIMIT
) {
462 parent
::setPager($rowCount);
470 function statistics(&$rows) {
471 $statistics = parent
::statistics($rows);
473 foreach ($rows as $rownum => $row) {
474 if (is_numeric($rownum)) {
478 $statistics['counts']['rowCount'] = array('title' => ts('Primary Contact(s) Listed'),
482 if ($this->_rowsFound
&& ($this->_rowsFound
> $count)) {
483 $statistics['counts']['rowsFound'] = array('title' => ts('Total Primary Contact(s)'),
484 'value' => $this->_rowsFound
,
498 static function formRule($fields, $files, $self) {
500 if (!empty($fields['this_year_value']) && !empty($fields['other_year_value']) &&
501 ($fields['this_year_value'] == $fields['other_year_value'])
503 $errors['other_year_value'] = ts("Value for filters 'This Year' and 'Other Years' can not be same.");
508 function postProcess() {
509 // get ready with post process params
510 $this->beginPostProcess();
511 $this->fixReportParams();
513 $this->buildACLClause($this->_aliases
['civicrm_contact']);
517 $this->customDataFrom();
522 // build array of result based on column headers. This method also allows
523 // modifying column headers before using it to build result set i.e $rows.
524 $this->buildRows($rows);
526 // format result set.
527 $this->formatDisplay($rows, FALSE);
529 // assign variables to templates
530 $this->doTemplateAssignment($rows);
532 // do print / pdf / instance stuff if needed
533 $this->endPostProcess($rows);
536 function fixReportParams() {
537 if (!empty($this->_params
['this_year_value'])) {
538 $this->_referenceYear
['this_year'] = $this->_params
['this_year_value'];
540 if (!empty($this->_params
['other_year_value'])) {
541 $this->_referenceYear
['other_year'] = $this->_params
['other_year_value'];
548 function buildRows(&$rows) {
549 $contactIds = array();
553 if (!empty($this->_referenceYear
['other_year'])) {
554 (CRM_Utils_Array
::value('other_year_op', $this->_params
) == 'calendar') ?
$other_receive_date = 'YEAR (contri.receive_date)' : $other_receive_date = self
::fiscalYearOffset('contri.receive_date');
555 $addWhere .= " AND {$this->_aliases['civicrm_contact']}.id NOT IN ( SELECT DISTINCT cont.id FROM civicrm_contact cont, civicrm_contribution contri WHERE cont.id = contri.contact_id AND {$other_receive_date} = {$this->_referenceYear['other_year']} AND contri.is_test = 0 ) ";
557 if (!empty($this->_referenceYear
['this_year'])) {
558 (CRM_Utils_Array
::value('this_year_op', $this->_params
) == 'calendar') ?
$receive_date = 'YEAR (contri.receive_date)' : $receive_date = self
::fiscalYearOffset('contri.receive_date');
559 $addWhere .= " AND {$this->_aliases['civicrm_contact']}.id IN ( SELECT DISTINCT cont.id FROM civicrm_contact cont, civicrm_contribution contri WHERE cont.id = contri.contact_id AND {$receive_date} = {$this->_referenceYear['this_year']} AND contri.is_test = 0 ) ";
562 $getContacts = "SELECT SQL_CALC_FOUND_ROWS {$this->_aliases['civicrm_contact']}.id as cid, SUM({$this->_aliases['civicrm_contribution']}.total_amount) as civicrm_contribution_total_amount_sum {$this->_from} {$this->_where} {$addWhere} GROUP BY {$this->_aliases['civicrm_contact']}.id {$this->_having} {$this->_limit}";
564 $dao = CRM_Core_DAO
::executeQuery($getContacts);
566 while ($dao->fetch()) {
567 $contactIds[] = $dao->cid
;
572 $relationshipRows = array();
573 if (empty($contactIds)) {
577 $primaryContributions = $this->buildContributionRows($contactIds);
579 list($relationshipRows, $relatedContactIds) = $this->buildRelationshipRows($contactIds);
581 if (empty($relatedContactIds)) {
582 $rows = $primaryContributions;
586 $relatedContributions = $this->buildContributionRows($relatedContactIds);
588 $summaryYears = array();
589 $summaryYears[] = "civicrm_upto_{$this->_yearStatisticsFrom}";
590 $yearConter = $this->_yearStatisticsFrom
;
592 while ($yearConter <= $this->_yearStatisticsTo
) {
593 $summaryYears[] = $yearConter;
596 $summaryYears[] = 'aggregate_amount';
598 foreach ($primaryContributions as $cid => $primaryRow) {
600 if (!isset($relationshipRows[$cid])) {
605 $total['civicrm_contact_sort_name'] = ts('Total');
606 foreach ($summaryYears as $year) {
607 $total[$year] = CRM_Utils_Array
::value($year, $primaryRow, 0);
610 $relatedContact = FALSE;
612 foreach ($relationshipRows[$cid] as $relcid => $relRow) {
613 if (!isset($relatedContributions[$relcid])) {
616 $relatedContact = TRUE;
617 $relatedRow = $relatedContributions[$relcid];
618 foreach ($summaryYears as $year) {
619 $total[$year] +
= CRM_Utils_Array
::value($year, $relatedRow, 0);
622 foreach (array_keys($this->_relationshipColumns
) as $col) {
623 if (!empty($relRow[$col])) {
624 $relatedRow[$col] = $relRow[$col];
627 $rows["{$cid}_{$relcid}"] = $relatedRow;
629 if ($relatedContact) {
630 $rows["{$cid}_total"] = $total;
631 $rows["{$cid}_bank"] = array('civicrm_contact_sort_name' => ' ');
641 function buildContributionRows($contactIds) {
643 if (empty($contactIds)) {
647 $sqlContribution = "{$this->_select} {$this->_from} WHERE {$this->_aliases['civicrm_contact']}.id IN (" . implode(',', $contactIds) . ") AND {$this->_aliases['civicrm_contribution']}.is_test = 0 {$this->_statusClause} {$this->_groupBy} ";
649 $dao = CRM_Core_DAO
::executeQuery($sqlContribution);
650 $contributionSum = 0;
652 while ($dao->fetch()) {
653 if (!$dao->civicrm_contact_id
) {
657 foreach ($this->_columnHeaders
as $key => $value) {
658 if (property_exists($dao, $key)) {
659 $rows[$dao->civicrm_contact_id
][$key] = $dao->$key;
662 if ($dao->civicrm_contribution_receive_date
) {
663 if ($dao->civicrm_contribution_receive_date
> $this->_yearStatisticsFrom
) {
664 $rows[$dao->civicrm_contact_id
][$dao->civicrm_contribution_receive_date
] = $dao->civicrm_contribution_total_amount
;
667 if (!isset($rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"])) {
668 $rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"] = 0;
671 $rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"] +
= $dao->civicrm_contribution_total_amount
;
675 if (!isset($rows[$dao->civicrm_contact_id
]['aggregate_amount'])) {
676 $rows[$dao->civicrm_contact_id
]['aggregate_amount'] = 0;
678 $rows[$dao->civicrm_contact_id
]['aggregate_amount'] +
= $dao->civicrm_contribution_total_amount
;
689 function buildRelationshipRows($contactIds) {
690 $relationshipRows = $relatedContactIds = array();
691 if (empty($contactIds)) {
692 return array($relationshipRows, $relatedContactIds);
695 $relContactAlias = 'contact_relationship';
697 if (!empty($this->_relationshipColumns
)) {
698 $addRelSelect = ', ' . implode(', ', $this->_relationshipColumns
);
700 $sqlRelationship = "SELECT {$this->_aliases['civicrm_relationship']}.relationship_type_id as relationship_type_id, {$this->_aliases['civicrm_relationship']}.contact_id_a as contact_id_a, {$this->_aliases['civicrm_relationship']}.contact_id_b as contact_id_b {$addRelSelect} FROM civicrm_contact {$relContactAlias} {$this->_relationshipFrom} WHERE {$relContactAlias}.id IN (" . implode(',', $contactIds) . ") AND {$this->_aliases['civicrm_relationship']}.is_active = 1 {$this->_relationshipWhere} GROUP BY {$this->_aliases['civicrm_relationship']}.contact_id_a, {$this->_aliases['civicrm_relationship']}.contact_id_b";
701 $relationshipTypes = CRM_Core_PseudoConstant
::relationshipType();
703 $dao = CRM_Core_DAO
::executeQuery($sqlRelationship);
704 while ($dao->fetch()) {
706 foreach (array_keys($this->_relationshipColumns
) as $rel_column) {
707 $row[$rel_column] = $dao->$rel_column;
709 if (in_array($dao->contact_id_a
, $contactIds)) {
710 $row['civicrm_relationship_relationship_type_id'] = $relationshipTypes[$dao->relationship_type_id
]['label_a_b'];
711 $row['civicrm_relationship_contact_id'] = $dao->contact_id_b
;
712 $relationshipRows[$dao->contact_id_a
][$dao->contact_id_b
] = $row;
713 $relatedContactIds[$dao->contact_id_b
] = $dao->contact_id_b
;
715 if (in_array($dao->contact_id_b
, $contactIds)) {
716 $row['civicrm_relationship_contact_id'] = $dao->contact_id_a
;
717 $row['civicrm_relationship_relationship_type_id'] = $relationshipTypes[$dao->relationship_type_id
]['label_b_a'];
718 $relationshipRows[$dao->contact_id_b
][$dao->contact_id_a
] = $row;
719 $relatedContactIds[$dao->contact_id_a
] = $dao->contact_id_a
;
723 return array($relationshipRows, $relatedContactIds);
726 // Override "This Year" $op options
728 * @param string $type
729 * @param null $fieldName
733 function getOperationPair($type = "string", $fieldName = NULL) {
734 if ($fieldName == 'this_year' ||
$fieldName == 'other_year') {
735 return array('calendar' => ts('Is Calendar Year'), 'fiscal' => ts('Fiscal Year Starting'));
737 return parent
::getOperationPair($type, $fieldName);
743 function alterDisplay(&$rows) {
749 $last_primary = NULL;
750 foreach ($rows as $rowNum => $row) {
751 // Highlight primary contact and amount row
752 if (is_numeric($rowNum) ||
753 ($last_primary && ($rowNum == "{$last_primary}_total"))
755 if (is_numeric($rowNum)) {
756 $last_primary = $rowNum;
758 foreach ($row as $key => $value) {
759 if ($key == 'civicrm_contact_id') {
767 if ($last_primary && ($rowNum == "{$last_primary}_total")) {
768 $value = CRM_Utils_Money
::format($value, ' ');
770 $row[$key] = '<strong>' . $value . '</strong>';
772 $rows[$rowNum] = $row;
775 // Convert Display name into link
776 if (!empty($row['civicrm_contact_sort_name']) && !empty($row['civicrm_contact_id'])) {
777 $url = CRM_Report_Utils_Report
::getNextUrl('contribute/detail',
778 'reset=1&force=1&id_op=eq&id_value=' . $row['civicrm_contact_id'],
779 $this->_absoluteUrl
, $this->_id
781 $rows[$rowNum]['civicrm_contact_sort_name_link'] = $url;
782 $rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts("View Contribution Details for this Contact.");