<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
);
public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report');
+ /**
+ *
+ */
+ /**
+ *
+ */
function __construct() {
// Check if CiviCampaign is a) enabled and b) has active campaigns
),
'grouping' => 'softcredit-fields',
),
- 'civicrm_group' =>
- array(
- 'dao' => 'CRM_Contact_DAO_GroupContact',
- 'alias' => 'cgroup',
- 'filters' =>
- array(
- 'gid' =>
- array(
- 'name' => 'group_id',
- 'title' => ts('Soft Credit Group'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'group' => TRUE,
- 'options' => CRM_Core_PseudoConstant::group(),
- ),
- ),
- ),
);
// If we have a campaign, build out the relevant elements
);
}
+ $this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
$this->_currencyColumn = 'civicrm_contribution_currency';
$this->_select = 'SELECT ' . implode(', ', $select) . ' ';
}
+ /**
+ * @param $fields
+ * @param $files
+ * @param $self
+ *
+ * @return array
+ */
static function formRule($fields, $files, $self) {
$errors = $grouping = array();
return $errors;
$this->_where .= " AND {$this->_aliases['civicrm_contribution']}.is_test = 0 ";
}
+ /**
+ * @param $rows
+ *
+ * @return array
+ */
function statistics(&$rows) {
$statistics = parent::statistics($rows);
$this->endPostProcess($rows);
}
+ /**
+ * @param $rows
+ */
function alterDisplay(&$rows) {
// custom code to alter rows
$entryFound = TRUE;
}
+ // convert soft credit contact name to link
+ if (array_key_exists('civicrm_contact_display_name_creditor', $row) && !empty($rows[$rowNum]['civicrm_contact_display_name_creditor']) &&
+ array_key_exists('civicrm_contact_id_creditor', $row)
+ ) {
+ $url = CRM_Utils_System::url("civicrm/contact/view",
+ 'reset=1&cid=' . $row['civicrm_contact_id_creditor'],
+ $this->_absoluteUrl
+ );
+ $rows[$rowNum]['civicrm_contact_display_name_creditor_link'] = $url;
+ $rows[$rowNum]['civicrm_contact_display_name_creditor_hover'] = ts("view contact summary");
+ }
+
// make subtotals look nicer
if (array_key_exists('civicrm_contact_id_constituent', $row) &&
!$row['civicrm_contact_id_constituent']