----------------------------------------
* CRM-18977: Contribution reports fails when Financial ACL is enabled
https://issues.civicrm.org/jira/browse/CRM-18977
else {
$contFTs = $liFTs = implode(',', array_keys($financialTypes));
}
+ $temp = CRM_Utils_Array::value('civicrm_line_item', $query->_aliases);
if ($alias) {
- $temp = CRM_Utils_Array::value('civicrm_line_item', $query->_aliases);
$query->_aliases['civicrm_line_item'] = $alias;
}
+ elseif (!$temp) {
+ $query->_aliases['civicrm_line_item'] = 'civicrm_line_item_civireport';
+ }
if (empty($query->_where)) {
$query->_where = "WHERE {$query->_aliases['civicrm_contribution']}.id IS NOT NULL ";
}