4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.3 |
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2013 |
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-2013
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 = '';
53 function __construct() {
55 $date = CRM_Core_SelectValues
::date('custom', NULL, $yearsInPast, 0);
56 $count = $date['maxYear'];
57 $optionYear = array('' => ts('-- select --'));
59 $this->_yearStatisticsFrom
= $date['minYear'];
60 $this->_yearStatisticsTo
= $date['maxYear'];
62 while ($date['minYear'] <= $count) {
63 $optionYear[$date['minYear']] = $date['minYear'];
67 $relationTypeOp = array();
68 $relationshipTypes = CRM_Core_PseudoConstant
::relationshipType();
69 foreach ($relationshipTypes as $rid => $rtype) {
70 if ($rtype['label_a_b'] != $rtype['label_b_a']) {
71 $relationTypeOp[$rid] = "{$rtype['label_a_b']}/{$rtype['label_b_a']}";
74 $relationTypeOp[$rid] = $rtype['label_a_b'];
78 $this->_columns
= array(
81 'dao' => 'CRM_Contact_DAO_Contact',
85 array('title' => ts('Contact Name'),
97 'grouping' => 'contact-fields',
101 array('title' => ts('Contact Name')),
103 array('title' => ts('Contact ID'),
104 'no_display' => TRUE,
110 'dao' => 'CRM_Core_DAO_Email',
114 array('title' => ts('Email'),
118 'grouping' => 'contact-fields',
122 'dao' => 'CRM_Core_DAO_Phone',
126 array('title' => ts('Phone'),
130 'grouping' => 'contact-fields',
132 ) +
$this->addAddressFields(FALSE, FALSE, FALSE, array(
133 )) +
array('civicrm_relationship' =>
135 'dao' => 'CRM_Contact_DAO_Relationship',
138 'relationship_type_id' =>
139 array('title' => ts('Relationship Type'),
143 array('no_display' => TRUE),
145 array('no_display' => TRUE),
149 'relationship_type_id' =>
150 array('title' => ts('Relationship Type'),
151 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
152 'options' => $relationTypeOp,
153 'type' => CRM_Utils_Type
::T_STRING
,
158 'civicrm_contribution' =>
160 'dao' => 'CRM_Contribute_DAO_Contribution',
164 array('title' => ts('Amount Statistics'),
167 'no_display' => TRUE,
169 array('sum' => ts('Aggregate Amount')),
175 'no_display' => TRUE,
178 'grouping' => 'contri-fields',
183 'title' => ts('This Year'),
184 'operatorType' => CRM_Report_Form
::OP_SELECT
,
185 'options' => $optionYear,
190 'title' => ts('Other Years'),
191 'operatorType' => CRM_Report_Form
::OP_SELECT
,
192 'options' => $optionYear,
196 array('operatorType' => CRM_Report_Form
::OP_DATE
),
197 'contribution_status_id' =>
198 array('title' => ts('Donation Status'),
199 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
200 'options' => CRM_Contribute_PseudoConstant
::contributionStatus(),
201 'default' => array(1),
203 'financial_type_id' => array(
204 'title' => ts('Financial Type'),
205 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
206 'options' => CRM_Contribute_PseudoConstant
::financialType(),
209 array('title' => ts('Donation Amount'),
212 array('title' => ts('Aggregate Amount'),
213 'type' => CRM_Report_Form
::OP_INT
,
214 'dbAlias' => 'civicrm_contribution_total_amount_sum',
222 'dao' => 'CRM_Contact_DAO_GroupContact',
228 'name' => 'group_id',
229 'title' => ts('Group'),
230 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
232 'options' => CRM_Core_PseudoConstant
::group(),
238 $this->_columns
['civicrm_contribution']['fields']['civicrm_upto_' . $this->_yearStatisticsFrom
] = array('title' => ts('Up To %1 Donation', array(1 => $this->_yearStatisticsFrom
)),
240 'type' => CRM_Utils_Type
::T_MONEY
,
241 'is_statistics' => TRUE,
244 $yearConter = $this->_yearStatisticsFrom
;
246 while ($yearConter <= $this->_yearStatisticsTo
) {
247 $this->_columns
['civicrm_contribution']['fields'][$yearConter] = array('title' => ts('%1 Donation', array(1 => $yearConter)),
249 'type' => CRM_Utils_Type
::T_MONEY
,
250 'is_statistics' => TRUE,
255 $this->_columns
['civicrm_contribution']['fields']['aggregate_amount'] = array('title' => ts('Aggregate Amount'),
256 'type' => CRM_Utils_Type
::T_MONEY
,
257 'is_statistics' => TRUE,
260 $this->_tagFilter
= TRUE;
261 parent
::__construct();
264 function preProcess() {
265 parent
::preProcess();
270 $this->_columnHeaders
= array();
272 foreach ($this->_columns
as $tableName => $table) {
273 if (array_key_exists('fields', $table)) {
274 foreach ($table['fields'] as $fieldName => $field) {
276 if (CRM_Utils_Array
::value('required', $field) ||
277 CRM_Utils_Array
::value($fieldName, $this->_params
['fields'])
279 if ($tableName == 'civicrm_address') {
280 $this->_addressField
= TRUE;
282 if ($tableName == 'civicrm_email') {
283 $this->_emailField
= TRUE;
285 if ($tableName == 'civicrm_phone') {
286 $this->_phoneField
= TRUE;
288 if ($tableName == 'civicrm_relationship') {
289 $this->_relationshipColumns
["{$tableName}_{$fieldName}"] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
290 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
291 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = $field['title'];
295 if (CRM_Utils_Array
::value('is_statistics', $field)) {
296 $this->_columnHeaders
[$fieldName]['type'] = $field['type'];
297 $this->_columnHeaders
[$fieldName]['title'] = $field['title'];
300 elseif ($fieldName == 'receive_date') {
301 if ((CRM_Utils_Array
::value('this_year_op', $this->_params
) == 'fiscal' &&
302 CRM_Utils_Array
::value('this_year_value', $this->_params
)) ||
303 (CRM_Utils_Array
::value('other_year_op', $this->_params
== 'fiscal') &&
304 CRM_Utils_Array
::value('other_year_value', $this->_params
)
306 $select[] = self
::fiscalYearOffset($field['dbAlias']) . " as {$tableName}_{$fieldName}";
308 $select[] = " YEAR(".$field['dbAlias'].")" . " as {$tableName}_{$fieldName}";
311 elseif ($fieldName == 'total_amount') {
312 $select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}";
315 $select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
316 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
317 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = $field['title'];
319 if (CRM_Utils_Array
::value('no_display', $field)) {
320 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['no_display'] = TRUE;
327 $this->_select
= "SELECT " . implode(', ', $select) . " ";
332 FROM civicrm_contact {$this->_aliases['civicrm_contact']}
333 INNER JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
334 ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_contribution']}.contact_id AND
335 {$this->_aliases['civicrm_contribution']}.is_test = 0 ";
337 if ($this->_emailField
) {
338 $this->_from
.= " LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']}
339 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND
340 {$this->_aliases['civicrm_email']}.is_primary = 1) ";
343 if ($this->_phoneField
) {
344 $this->_from
.= " LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
345 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND
346 {$this->_aliases['civicrm_phone']}.is_primary = 1) ";
349 $relContacAlias = 'contact_relationship';
350 $this->_relationshipFrom
= " INNER JOIN civicrm_relationship {$this->_aliases['civicrm_relationship']}
351 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) ";
353 if ($this->_addressField
) {
355 LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
356 ON {$this->_aliases['civicrm_contact']}.id =
357 {$this->_aliases['civicrm_address']}.contact_id AND
358 {$this->_aliases['civicrm_address']}.is_primary = 1\n";
363 $whereClauses = $havingClauses = $relationshipWhere = array();
364 $this->_relationshipWhere
= '';
365 $this->_statusClause
= '';
367 foreach ($this->_columns
as $tableName => $table) {
368 if (array_key_exists('filters', $table)) {
369 foreach ($table['filters'] as $fieldName => $field) {
371 if ($fieldName == 'this_year' ||
$fieldName == 'other_year') {
373 }elseif (CRM_Utils_Array
::value('type', $field) & CRM_Utils_Type
::T_DATE
) {
374 $relative = CRM_Utils_Array
::value("{$fieldName}_relative", $this->_params
);
375 $from = CRM_Utils_Array
::value("{$fieldName}_from", $this->_params
);
376 $to = CRM_Utils_Array
::value("{$fieldName}_to", $this->_params
);
378 $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
381 $op = CRM_Utils_Array
::value("{$fieldName}_op", $this->_params
);
383 $clause = $this->whereClause($field,
385 CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
),
386 CRM_Utils_Array
::value("{$fieldName}_min", $this->_params
),
387 CRM_Utils_Array
::value("{$fieldName}_max", $this->_params
)
392 if (!empty($clause)) {
393 if ($tableName == 'civicrm_relationship') {
394 $relationshipWhere[] = $clause;
398 if ($fieldName == 'contribution_status_id') {
399 $this->_statusClause
= " AND " . $clause;
402 if (CRM_Utils_Array
::value('having', $field)) {
403 $havingClauses[] = $clause;
406 $whereClauses[] = $clause;
413 if (empty($whereClauses)) {
414 $this->_where
= "WHERE ( 1 ) ";
418 $this->_where
= "WHERE " . implode(' AND ', $whereClauses);
421 if ($this->_aclWhere
) {
422 $this->_where
.= " AND {$this->_aclWhere} ";
425 if (!empty($havingClauses)) {
426 // use this clause to construct group by clause.
427 $this->_having
= "HAVING " . implode(' AND ', $havingClauses);
430 if (!empty($relationshipWhere)) {
431 $this->_relationshipWhere
= ' AND ' . implode(' AND ', $relationshipWhere);
436 $this->_groupBy
= "GROUP BY {$this->_aliases['civicrm_contribution']}.contact_id, YEAR({$this->_aliases['civicrm_contribution']}.receive_date)";
439 //Override to set limit is 10
440 function limit($rowCount = self
::ROW_COUNT_LIMIT
) {
441 parent
::limit($rowCount);
444 //Override to set pager with limit is 10
445 function setPager($rowCount = self
::ROW_COUNT_LIMIT
) {
446 parent
::setPager($rowCount);
449 function statistics(&$rows) {
450 $statistics = parent
::statistics($rows);
452 foreach ($rows as $rownum => $row) {
453 if (is_numeric($rownum)) {
457 $statistics['counts']['rowCount'] = array('title' => ts('Primary Contact(s) Listed'),
461 if ($this->_rowsFound
&& ($this->_rowsFound
> $count)) {
462 $statistics['counts']['rowsFound'] = array('title' => ts('Total Primary Contact(s)'),
463 'value' => $this->_rowsFound
,
470 static function formRule($fields, $files, $self) {
472 if (CRM_Utils_Array
::value('this_year_value', $fields) &&
473 CRM_Utils_Array
::value('other_year_value', $fields) &&
474 ($fields['this_year_value'] == $fields['other_year_value'])
476 $errors['other_year_value'] = ts("Value for filters 'This Year' and 'Other Years' can not be same.");
481 function postProcess() {
482 // get ready with post process params
483 $this->beginPostProcess();
484 $this->fixReportParams();
486 $this->buildACLClause($this->_aliases
['civicrm_contact']);
494 // build array of result based on column headers. This method also allows
495 // modifying column headers before using it to build result set i.e $rows.
496 $this->buildRows($rows);
498 // format result set.
499 $this->formatDisplay($rows, FALSE);
501 // assign variables to templates
502 $this->doTemplateAssignment($rows);
504 // do print / pdf / instance stuff if needed
505 $this->endPostProcess($rows);
508 function fixReportParams() {
509 if (CRM_Utils_Array
::value('this_year_value', $this->_params
)) {
510 $this->_referenceYear
['this_year'] = $this->_params
['this_year_value'];
512 if (CRM_Utils_Array
::value('other_year_value', $this->_params
)) {
513 $this->_referenceYear
['other_year'] = $this->_params
['other_year_value'];
517 function buildRows(&$rows) {
518 $contactIds = array();
522 if (CRM_Utils_Array
::value('other_year', $this->_referenceYear
)) {
523 (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');
524 $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 ) ";
526 if (CRM_Utils_Array
::value('this_year', $this->_referenceYear
)) {
527 (CRM_Utils_Array
::value('this_year_op', $this->_params
) == 'calendar') ?
$receive_date = 'YEAR (contri.receive_date)' : $receive_date = self
::fiscalYearOffset('contri.receive_date');
528 $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 ) ";
531 $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}";
533 $dao = CRM_Core_DAO
::executeQuery($getContacts);
535 while ($dao->fetch()) {
536 $contactIds[] = $dao->cid
;
541 $relationshipRows = array();
542 if (empty($contactIds)) {
546 $primaryContributions = $this->buildContributionRows($contactIds);
548 list($relationshipRows, $relatedContactIds) = $this->buildRelationshipRows($contactIds);
550 if (empty($relatedContactIds)) {
551 $rows = $primaryContributions;
555 $relatedContributions = $this->buildContributionRows($relatedContactIds);
557 $summaryYears = array();
558 $summaryYears[] = "civicrm_upto_{$this->_yearStatisticsFrom}";
559 $yearConter = $this->_yearStatisticsFrom
;
561 while ($yearConter <= $this->_yearStatisticsTo
) {
562 $summaryYears[] = $yearConter;
565 $summaryYears[] = 'aggregate_amount';
567 foreach ($primaryContributions as $cid => $primaryRow) {
569 if (!isset($relationshipRows[$cid])) {
574 $total['civicrm_contact_sort_name'] = ts('Total');
575 foreach ($summaryYears as $year) {
576 $total[$year] = CRM_Utils_Array
::value($year, $primaryRow, 0);
579 $relatedContact = FALSE;
581 foreach ($relationshipRows[$cid] as $relcid => $relRow) {
582 if (!isset($relatedContributions[$relcid])) {
585 $relatedContact = TRUE;
586 $relatedRow = $relatedContributions[$relcid];
587 foreach ($summaryYears as $year) {
588 $total[$year] +
= CRM_Utils_Array
::value($year, $relatedRow, 0);
591 foreach (array_keys($this->_relationshipColumns
) as $col) {
592 if (CRM_Utils_Array
::value($col, $relRow)) {
593 $relatedRow[$col] = $relRow[$col];
596 $rows["{$cid}_{$relcid}"] = $relatedRow;
598 if ($relatedContact) {
599 $rows["{$cid}_total"] = $total;
600 $rows["{$cid}_bank"] = array('civicrm_contact_sort_name' => ' ');
605 function buildContributionRows($contactIds) {
607 if (empty($contactIds)) {
611 $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} ";
613 $dao = CRM_Core_DAO
::executeQuery($sqlContribution);
614 $contributionSum = 0;
616 while ($dao->fetch()) {
617 if (!$dao->civicrm_contact_id
) {
621 foreach ($this->_columnHeaders
as $key => $value) {
622 if (property_exists($dao, $key)) {
623 $rows[$dao->civicrm_contact_id
][$key] = $dao->$key;
626 if ($dao->civicrm_contribution_receive_date
) {
627 if ($dao->civicrm_contribution_receive_date
> $this->_yearStatisticsFrom
) {
628 $rows[$dao->civicrm_contact_id
][$dao->civicrm_contribution_receive_date
] = $dao->civicrm_contribution_total_amount
;
631 if (!isset($rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"])) {
632 $rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"] = 0;
635 $rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"] +
= $dao->civicrm_contribution_total_amount
;
639 if (!isset($rows[$dao->civicrm_contact_id
]['aggregate_amount'])) {
640 $rows[$dao->civicrm_contact_id
]['aggregate_amount'] = 0;
642 $rows[$dao->civicrm_contact_id
]['aggregate_amount'] +
= $dao->civicrm_contribution_total_amount
;
648 function buildRelationshipRows($contactIds) {
649 $relationshipRows = $relatedContactIds = array();
650 if (empty($contactIds)) {
651 return array($relationshipRows, $relatedContactIds);
654 $relContactAlias = 'contact_relationship';
656 if (!empty($this->_relationshipColumns
)) {
657 $addRelSelect = ', ' . implode(', ', $this->_relationshipColumns
);
659 $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";
660 $relationshipTypes = CRM_Core_PseudoConstant
::relationshipType();
662 $dao = CRM_Core_DAO
::executeQuery($sqlRelationship);
663 while ($dao->fetch()) {
665 foreach (array_keys($this->_relationshipColumns
) as $rel_column) {
666 $row[$rel_column] = $dao->$rel_column;
668 if (in_array($dao->contact_id_a
, $contactIds)) {
669 $row['civicrm_relationship_relationship_type_id'] = $relationshipTypes[$dao->relationship_type_id
]['label_a_b'];
670 $row['civicrm_relationship_contact_id'] = $dao->contact_id_b
;
671 $relationshipRows[$dao->contact_id_a
][$dao->contact_id_b
] = $row;
672 $relatedContactIds[$dao->contact_id_b
] = $dao->contact_id_b
;
674 if (in_array($dao->contact_id_b
, $contactIds)) {
675 $row['civicrm_relationship_contact_id'] = $dao->contact_id_a
;
676 $row['civicrm_relationship_relationship_type_id'] = $relationshipTypes[$dao->relationship_type_id
]['label_b_a'];
677 $relationshipRows[$dao->contact_id_b
][$dao->contact_id_a
] = $row;
678 $relatedContactIds[$dao->contact_id_a
] = $dao->contact_id_a
;
682 return array($relationshipRows, $relatedContactIds);
685 // Override "This Year" $op options
686 function getOperationPair($type = "string", $fieldName = NULL) {
687 if ($fieldName == 'this_year' ||
$fieldName == 'other_year') {
688 return array('calendar' => ts('Is Calendar Year'), 'fiscal' => ts('Fiscal Year Starting'));
690 return parent
::getOperationPair($type, $fieldName);
693 function alterDisplay(&$rows) {
699 $last_primary = NULL;
700 foreach ($rows as $rowNum => $row) {
701 // Highlight primary contact and amount row
702 if (is_numeric($rowNum) ||
703 ($last_primary && ($rowNum == "{$last_primary}_total"))
705 if (is_numeric($rowNum)) {
706 $last_primary = $rowNum;
708 foreach ($row as $key => $value) {
709 if ($key == 'civicrm_contact_id') {
717 if ($last_primary && ($rowNum == "{$last_primary}_total")) {
718 $value = CRM_Utils_Money
::format($value, ' ');
720 $row[$key] = '<strong>' . $value . '</strong>';
722 $rows[$rowNum] = $row;
725 // Convert Display name into link
726 if (CRM_Utils_Array
::value('civicrm_contact_sort_name', $row) &&
727 CRM_Utils_Array
::value('civicrm_contact_id', $row)
729 $url = CRM_Report_Utils_Report
::getNextUrl('contribute/detail',
730 'reset=1&force=1&id_op=eq&id_value=' . $row['civicrm_contact_id'],
731 $this->_absoluteUrl
, $this->_id
733 $rows[$rowNum]['civicrm_contact_sort_name_link'] = $url;
734 $rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts("View Contribution Details for this Contact.");