Skip to content
Snippets Groups Projects
Commit 6b869e0b authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #779 from davecivicrm/CRM-12637

Applied patch from Helen Bergin to include multiple contributions in sam...
parents cf5c22ba f480d851
No related branches found
No related tags found
No related merge requests found
......@@ -293,10 +293,6 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
continue;
}
if ($fieldName == 'total_amount') {
$select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}";
}
if (CRM_Utils_Array::value('is_statistics', $field)) {
$this->_columnHeaders[$fieldName]['type'] = $field['type'];
$this->_columnHeaders[$fieldName]['title'] = $field['title'];
......@@ -313,6 +309,9 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
$select[] = " YEAR(".$field['dbAlias'].")" . " as {$tableName}_{$fieldName}";
}
}
elseif ($fieldName == 'total_amount') {
$select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}";
}
else {
$select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
$this->_columnHeaders["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array::value('type', $field);
......@@ -685,7 +684,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
}
// Override "This Year" $op options
function getOperationPair($type = "string", $fieldName = NULL) {
static function getOperationPair($type = "string", $fieldName = NULL) {
if ($fieldName == 'this_year' || $fieldName == 'other_year') {
return array('calendar' => ts('Is Calendar Year'), 'fiscal' => ts('Fiscal Year Starting'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment