*/
protected $groupFilterNotOptimised = FALSE;
+ /**
+ * @var string
+ */
+ protected $statusClause = '';
+
/**
* Class constructor.
*/
}
public function where() {
- $this->_statusClause = "";
+ $this->statusClause = "";
$clauses = [
$this->_aliases['civicrm_contribution'] . '.is_test = 0',
$this->_aliases['civicrm_contribution'] . '.is_template = 0',
if (($fieldName == 'contribution_status_id' ||
$fieldName == 'financial_type_id') && !empty($clause)
) {
- $this->_statusClause .= " AND " . $clause;
+ $this->statusClause .= " AND " . $clause;
}
}
}
$sql = "" .
"{$this->_select} {$this->_from} WHERE {$this->_aliases['civicrm_contact']}.id IN (" .
implode(',', $contactIds) .
- ") AND {$this->_aliases['civicrm_contribution']}.is_test = 0 AND {$this->_aliases['civicrm_contribution']}.is_template = 0 {$this->_statusClause} {$this->_groupBy} ";
+ ") AND {$this->_aliases['civicrm_contribution']}.is_test = 0 AND {$this->_aliases['civicrm_contribution']}.is_template = 0 {$this->statusClause} {$this->_groupBy} ";
}
$current_year = $this->_params['yid_value'];
*/
public function buildChart(&$rows) {
$graphRows = [];
- $count = 0;
+ $display = [];
$current_year = $this->_params['yid_value'];
$previous_year = $current_year - 1;
$previous_two_year = $current_year - 2;