4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.4 |
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'),
98 'title' => ts('Contact Type'),
100 'contact_sub_type' =>
102 'title' => ts('Contact SubType'),
105 'grouping' => 'contact-fields',
109 array('title' => ts('Contact Name')),
111 array('title' => ts('Contact ID'),
112 'no_display' => TRUE,
118 'dao' => 'CRM_Core_DAO_Email',
122 array('title' => ts('Email'),
126 'grouping' => 'contact-fields',
130 'dao' => 'CRM_Core_DAO_Phone',
134 array('title' => ts('Phone'),
138 'grouping' => 'contact-fields',
140 ) +
$this->addAddressFields(FALSE, FALSE, FALSE, array(
141 )) +
array('civicrm_relationship' =>
143 'dao' => 'CRM_Contact_DAO_Relationship',
146 'relationship_type_id' =>
147 array('title' => ts('Relationship Type'),
151 array('no_display' => TRUE),
153 array('no_display' => TRUE),
157 'relationship_type_id' =>
158 array('title' => ts('Relationship Type'),
159 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
160 'options' => $relationTypeOp,
161 'type' => CRM_Utils_Type
::T_STRING
,
166 'civicrm_contribution' =>
168 'dao' => 'CRM_Contribute_DAO_Contribution',
172 array('title' => ts('Amount Statistics'),
175 'no_display' => TRUE,
177 array('sum' => ts('Aggregate Amount')),
183 'no_display' => TRUE,
186 'grouping' => 'contri-fields',
191 'title' => ts('This Year'),
192 'operatorType' => CRM_Report_Form
::OP_SELECT
,
193 'options' => $optionYear,
198 'title' => ts('Other Years'),
199 'operatorType' => CRM_Report_Form
::OP_SELECT
,
200 'options' => $optionYear,
204 array('operatorType' => CRM_Report_Form
::OP_DATE
),
205 'contribution_status_id' =>
206 array('title' => ts('Donation Status'),
207 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
208 'options' => CRM_Contribute_PseudoConstant
::contributionStatus(),
209 'default' => array(1),
211 'financial_type_id' => array(
212 'title' => ts('Financial Type'),
213 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
214 'options' => CRM_Contribute_PseudoConstant
::financialType(),
217 array('title' => ts('Donation Amount'),
220 array('title' => ts('Aggregate Amount'),
221 'type' => CRM_Report_Form
::OP_INT
,
222 'dbAlias' => 'civicrm_contribution_total_amount_sum',
230 'dao' => 'CRM_Contact_DAO_GroupContact',
236 'name' => 'group_id',
237 'title' => ts('Group'),
238 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
240 'options' => CRM_Core_PseudoConstant
::group(),
246 $this->_columns
['civicrm_contribution']['fields']['civicrm_upto_' . $this->_yearStatisticsFrom
] = array('title' => ts('Up To %1 Donation', array(1 => $this->_yearStatisticsFrom
)),
248 'type' => CRM_Utils_Type
::T_MONEY
,
249 'is_statistics' => TRUE,
252 $yearConter = $this->_yearStatisticsFrom
;
254 while ($yearConter <= $this->_yearStatisticsTo
) {
255 $this->_columns
['civicrm_contribution']['fields'][$yearConter] = array('title' => ts('%1 Donation', array(1 => $yearConter)),
257 'type' => CRM_Utils_Type
::T_MONEY
,
258 'is_statistics' => TRUE,
263 $this->_columns
['civicrm_contribution']['fields']['aggregate_amount'] = array('title' => ts('Aggregate Amount'),
264 'type' => CRM_Utils_Type
::T_MONEY
,
265 'is_statistics' => TRUE,
268 $this->_tagFilter
= TRUE;
269 parent
::__construct();
272 function preProcess() {
273 parent
::preProcess();
278 $this->_columnHeaders
= array();
280 foreach ($this->_columns
as $tableName => $table) {
281 if (array_key_exists('fields', $table)) {
282 foreach ($table['fields'] as $fieldName => $field) {
284 if (!empty($field['required']) ||
!empty($this->_params
['fields'][$fieldName])) {
285 if ($tableName == 'civicrm_address') {
286 $this->_addressField
= TRUE;
288 if ($tableName == 'civicrm_email') {
289 $this->_emailField
= TRUE;
291 if ($tableName == 'civicrm_phone') {
292 $this->_phoneField
= TRUE;
294 if ($tableName == 'civicrm_relationship') {
295 $this->_relationshipColumns
["{$tableName}_{$fieldName}"] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
296 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
297 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = $field['title'];
301 if (!empty($field['is_statistics'])) {
302 $this->_columnHeaders
[$fieldName]['type'] = $field['type'];
303 $this->_columnHeaders
[$fieldName]['title'] = $field['title'];
306 elseif ($fieldName == 'receive_date') {
307 if ((CRM_Utils_Array
::value('this_year_op', $this->_params
) == 'fiscal' && !empty($this->_params
['this_year_value'])) ||
308 (CRM_Utils_Array
::value('other_year_op', $this->_params
== 'fiscal') && !empty($this->_params
['other_year_value']))){
309 $select[] = self
::fiscalYearOffset($field['dbAlias']) . " as {$tableName}_{$fieldName}";
311 $select[] = " YEAR(".$field['dbAlias'].")" . " as {$tableName}_{$fieldName}";
314 elseif ($fieldName == 'total_amount') {
315 $select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}";
318 $select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
319 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
320 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = $field['title'];
322 if (!empty($field['no_display'])) {
323 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['no_display'] = TRUE;
330 $this->_select
= "SELECT " . implode(', ', $select) . " ";
335 FROM civicrm_contact {$this->_aliases['civicrm_contact']}
336 INNER JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
337 ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_contribution']}.contact_id AND
338 {$this->_aliases['civicrm_contribution']}.is_test = 0 ";
340 if ($this->_emailField
) {
341 $this->_from
.= " LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']}
342 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND
343 {$this->_aliases['civicrm_email']}.is_primary = 1) ";
346 if ($this->_phoneField
) {
347 $this->_from
.= " LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
348 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND
349 {$this->_aliases['civicrm_phone']}.is_primary = 1) ";
352 $relContacAlias = 'contact_relationship';
353 $this->_relationshipFrom
= " INNER JOIN civicrm_relationship {$this->_aliases['civicrm_relationship']}
354 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) ";
356 if ($this->_addressField
) {
358 LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
359 ON {$this->_aliases['civicrm_contact']}.id =
360 {$this->_aliases['civicrm_address']}.contact_id AND
361 {$this->_aliases['civicrm_address']}.is_primary = 1\n";
366 $whereClauses = $havingClauses = $relationshipWhere = array();
367 $this->_relationshipWhere
= '';
368 $this->_statusClause
= '';
370 foreach ($this->_columns
as $tableName => $table) {
371 if (array_key_exists('filters', $table)) {
372 foreach ($table['filters'] as $fieldName => $field) {
374 if ($fieldName == 'this_year' ||
$fieldName == 'other_year') {
376 }elseif (CRM_Utils_Array
::value('type', $field) & CRM_Utils_Type
::T_DATE
) {
377 $relative = CRM_Utils_Array
::value("{$fieldName}_relative", $this->_params
);
378 $from = CRM_Utils_Array
::value("{$fieldName}_from", $this->_params
);
379 $to = CRM_Utils_Array
::value("{$fieldName}_to", $this->_params
);
381 $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
384 $op = CRM_Utils_Array
::value("{$fieldName}_op", $this->_params
);
386 $clause = $this->whereClause($field,
388 CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
),
389 CRM_Utils_Array
::value("{$fieldName}_min", $this->_params
),
390 CRM_Utils_Array
::value("{$fieldName}_max", $this->_params
)
395 if (!empty($clause)) {
396 if ($tableName == 'civicrm_relationship') {
397 $relationshipWhere[] = $clause;
401 if ($fieldName == 'contribution_status_id') {
402 $this->_statusClause
= " AND " . $clause;
405 if (!empty($field['having'])) {
406 $havingClauses[] = $clause;
409 $whereClauses[] = $clause;
416 if (empty($whereClauses)) {
417 $this->_where
= "WHERE ( 1 ) ";
421 $this->_where
= "WHERE " . implode(' AND ', $whereClauses);
424 if ($this->_aclWhere
) {
425 $this->_where
.= " AND {$this->_aclWhere} ";
428 if (!empty($havingClauses)) {
429 // use this clause to construct group by clause.
430 $this->_having
= "HAVING " . implode(' AND ', $havingClauses);
433 if (!empty($relationshipWhere)) {
434 $this->_relationshipWhere
= ' AND ' . implode(' AND ', $relationshipWhere);
439 $this->_groupBy
= "GROUP BY {$this->_aliases['civicrm_contribution']}.contact_id, YEAR({$this->_aliases['civicrm_contribution']}.receive_date)";
442 //Override to set limit is 10
443 function limit($rowCount = self
::ROW_COUNT_LIMIT
) {
444 parent
::limit($rowCount);
447 //Override to set pager with limit is 10
448 function setPager($rowCount = self
::ROW_COUNT_LIMIT
) {
449 parent
::setPager($rowCount);
452 function statistics(&$rows) {
453 $statistics = parent
::statistics($rows);
455 foreach ($rows as $rownum => $row) {
456 if (is_numeric($rownum)) {
460 $statistics['counts']['rowCount'] = array('title' => ts('Primary Contact(s) Listed'),
464 if ($this->_rowsFound
&& ($this->_rowsFound
> $count)) {
465 $statistics['counts']['rowsFound'] = array('title' => ts('Total Primary Contact(s)'),
466 'value' => $this->_rowsFound
,
473 static function formRule($fields, $files, $self) {
475 if (!empty($fields['this_year_value']) && !empty($fields['other_year_value']) &&
476 ($fields['this_year_value'] == $fields['other_year_value'])
478 $errors['other_year_value'] = ts("Value for filters 'This Year' and 'Other Years' can not be same.");
483 function postProcess() {
484 // get ready with post process params
485 $this->beginPostProcess();
486 $this->fixReportParams();
488 $this->buildACLClause($this->_aliases
['civicrm_contact']);
496 // build array of result based on column headers. This method also allows
497 // modifying column headers before using it to build result set i.e $rows.
498 $this->buildRows($rows);
500 // format result set.
501 $this->formatDisplay($rows, FALSE);
503 // assign variables to templates
504 $this->doTemplateAssignment($rows);
506 // do print / pdf / instance stuff if needed
507 $this->endPostProcess($rows);
510 function fixReportParams() {
511 if (!empty($this->_params
['this_year_value'])) {
512 $this->_referenceYear
['this_year'] = $this->_params
['this_year_value'];
514 if (!empty($this->_params
['other_year_value'])) {
515 $this->_referenceYear
['other_year'] = $this->_params
['other_year_value'];
519 function buildRows(&$rows) {
520 $contactIds = array();
524 if (!empty($this->_referenceYear
['other_year'])) {
525 (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');
526 $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 ) ";
528 if (!empty($this->_referenceYear
['this_year'])) {
529 (CRM_Utils_Array
::value('this_year_op', $this->_params
) == 'calendar') ?
$receive_date = 'YEAR (contri.receive_date)' : $receive_date = self
::fiscalYearOffset('contri.receive_date');
530 $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 ) ";
533 $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}";
535 $dao = CRM_Core_DAO
::executeQuery($getContacts);
537 while ($dao->fetch()) {
538 $contactIds[] = $dao->cid
;
543 $relationshipRows = array();
544 if (empty($contactIds)) {
548 $primaryContributions = $this->buildContributionRows($contactIds);
550 list($relationshipRows, $relatedContactIds) = $this->buildRelationshipRows($contactIds);
552 if (empty($relatedContactIds)) {
553 $rows = $primaryContributions;
557 $relatedContributions = $this->buildContributionRows($relatedContactIds);
559 $summaryYears = array();
560 $summaryYears[] = "civicrm_upto_{$this->_yearStatisticsFrom}";
561 $yearConter = $this->_yearStatisticsFrom
;
563 while ($yearConter <= $this->_yearStatisticsTo
) {
564 $summaryYears[] = $yearConter;
567 $summaryYears[] = 'aggregate_amount';
569 foreach ($primaryContributions as $cid => $primaryRow) {
571 if (!isset($relationshipRows[$cid])) {
576 $total['civicrm_contact_sort_name'] = ts('Total');
577 foreach ($summaryYears as $year) {
578 $total[$year] = CRM_Utils_Array
::value($year, $primaryRow, 0);
581 $relatedContact = FALSE;
583 foreach ($relationshipRows[$cid] as $relcid => $relRow) {
584 if (!isset($relatedContributions[$relcid])) {
587 $relatedContact = TRUE;
588 $relatedRow = $relatedContributions[$relcid];
589 foreach ($summaryYears as $year) {
590 $total[$year] +
= CRM_Utils_Array
::value($year, $relatedRow, 0);
593 foreach (array_keys($this->_relationshipColumns
) as $col) {
594 if (!empty($relRow[$col])) {
595 $relatedRow[$col] = $relRow[$col];
598 $rows["{$cid}_{$relcid}"] = $relatedRow;
600 if ($relatedContact) {
601 $rows["{$cid}_total"] = $total;
602 $rows["{$cid}_bank"] = array('civicrm_contact_sort_name' => ' ');
607 function buildContributionRows($contactIds) {
609 if (empty($contactIds)) {
613 $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} ";
615 $dao = CRM_Core_DAO
::executeQuery($sqlContribution);
616 $contributionSum = 0;
618 while ($dao->fetch()) {
619 if (!$dao->civicrm_contact_id
) {
623 foreach ($this->_columnHeaders
as $key => $value) {
624 if (property_exists($dao, $key)) {
625 $rows[$dao->civicrm_contact_id
][$key] = $dao->$key;
628 if ($dao->civicrm_contribution_receive_date
) {
629 if ($dao->civicrm_contribution_receive_date
> $this->_yearStatisticsFrom
) {
630 $rows[$dao->civicrm_contact_id
][$dao->civicrm_contribution_receive_date
] = $dao->civicrm_contribution_total_amount
;
633 if (!isset($rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"])) {
634 $rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"] = 0;
637 $rows[$dao->civicrm_contact_id
]["civicrm_upto_{$this->_yearStatisticsFrom}"] +
= $dao->civicrm_contribution_total_amount
;
641 if (!isset($rows[$dao->civicrm_contact_id
]['aggregate_amount'])) {
642 $rows[$dao->civicrm_contact_id
]['aggregate_amount'] = 0;
644 $rows[$dao->civicrm_contact_id
]['aggregate_amount'] +
= $dao->civicrm_contribution_total_amount
;
650 function buildRelationshipRows($contactIds) {
651 $relationshipRows = $relatedContactIds = array();
652 if (empty($contactIds)) {
653 return array($relationshipRows, $relatedContactIds);
656 $relContactAlias = 'contact_relationship';
658 if (!empty($this->_relationshipColumns
)) {
659 $addRelSelect = ', ' . implode(', ', $this->_relationshipColumns
);
661 $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";
662 $relationshipTypes = CRM_Core_PseudoConstant
::relationshipType();
664 $dao = CRM_Core_DAO
::executeQuery($sqlRelationship);
665 while ($dao->fetch()) {
667 foreach (array_keys($this->_relationshipColumns
) as $rel_column) {
668 $row[$rel_column] = $dao->$rel_column;
670 if (in_array($dao->contact_id_a
, $contactIds)) {
671 $row['civicrm_relationship_relationship_type_id'] = $relationshipTypes[$dao->relationship_type_id
]['label_a_b'];
672 $row['civicrm_relationship_contact_id'] = $dao->contact_id_b
;
673 $relationshipRows[$dao->contact_id_a
][$dao->contact_id_b
] = $row;
674 $relatedContactIds[$dao->contact_id_b
] = $dao->contact_id_b
;
676 if (in_array($dao->contact_id_b
, $contactIds)) {
677 $row['civicrm_relationship_contact_id'] = $dao->contact_id_a
;
678 $row['civicrm_relationship_relationship_type_id'] = $relationshipTypes[$dao->relationship_type_id
]['label_b_a'];
679 $relationshipRows[$dao->contact_id_b
][$dao->contact_id_a
] = $row;
680 $relatedContactIds[$dao->contact_id_a
] = $dao->contact_id_a
;
684 return array($relationshipRows, $relatedContactIds);
687 // Override "This Year" $op options
688 function getOperationPair($type = "string", $fieldName = NULL) {
689 if ($fieldName == 'this_year' ||
$fieldName == 'other_year') {
690 return array('calendar' => ts('Is Calendar Year'), 'fiscal' => ts('Fiscal Year Starting'));
692 return parent
::getOperationPair($type, $fieldName);
695 function alterDisplay(&$rows) {
701 $last_primary = NULL;
702 foreach ($rows as $rowNum => $row) {
703 // Highlight primary contact and amount row
704 if (is_numeric($rowNum) ||
705 ($last_primary && ($rowNum == "{$last_primary}_total"))
707 if (is_numeric($rowNum)) {
708 $last_primary = $rowNum;
710 foreach ($row as $key => $value) {
711 if ($key == 'civicrm_contact_id') {
719 if ($last_primary && ($rowNum == "{$last_primary}_total")) {
720 $value = CRM_Utils_Money
::format($value, ' ');
722 $row[$key] = '<strong>' . $value . '</strong>';
724 $rows[$rowNum] = $row;
727 // Convert Display name into link
728 if (!empty($row['civicrm_contact_sort_name']) && !empty($row['civicrm_contact_id'])) {
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.");