public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report');
protected $lifeTime_from = NULL;
public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report');
protected $lifeTime_from = NULL;
$yearsInPast = 10;
$yearsInFuture = 1;
$date = CRM_Core_SelectValues::date('custom', NULL, $yearsInPast, $yearsInFuture);
$yearsInPast = 10;
$yearsInFuture = 1;
$date = CRM_Core_SelectValues::date('custom', NULL, $yearsInPast, $yearsInFuture);
'title' => ts('Financial Type'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
'title' => ts('Financial Type'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::financialType(),
- {$this->_aliases['civicrm_email']}.is_primary = 1
- LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
+ {$this->_aliases['civicrm_email']}.is_primary = 1
+ LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND
{$this->_aliases['civicrm_phone']}.is_primary = 1 ";
}
ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND
{$this->_aliases['civicrm_phone']}.is_primary = 1 ";
}
-(SELECT distinct contri.contact_id FROM civicrm_contribution contri
- WHERE contri.is_test = 0 AND " . self::fiscalYearOffset('contri.receive_date') . " = $current_year) AND contribution_civireport.contact_id IN (SELECT distinct contri.contact_id FROM civicrm_contribution contri
+(SELECT distinct contri.contact_id FROM civicrm_contribution contri
+ WHERE contri.is_test = 0 AND " . self::fiscalYearOffset('contri.receive_date') . " = $current_year) AND contribution_civireport.contact_id IN (SELECT distinct contri.contact_id FROM civicrm_contribution contri
WHERE " . self::fiscalYearOffset('contri.receive_date') . " = $previous_year AND contri.is_test = 0)";
}
elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
WHERE " . self::fiscalYearOffset('contri.receive_date') . " = $previous_year AND contri.is_test = 0)";
}
elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
SUM({$this->_aliases['civicrm_contribution']}.total_amount ) as amount ";
$sql = "{$select} {$this->_from} {$this->_where}";
SUM({$this->_aliases['civicrm_contribution']}.total_amount ) as amount ";
$sql = "{$select} {$this->_from} {$this->_where}";