public $_having = NULL;
public $_select = NULL;
+ public $_selectClauses = array();
public $_columnHeaders = array();
public $_orderBy = NULL;
public $_orderByFields = array();
}
// a few auto fills for filters
- if ($fieldGrp == 'filters') {
+ if ($fieldGrp == 'filters') {
// fill operator types
if (!array_key_exists('operatorType', $this->_columns[$tableName][$fieldGrp][$fieldName])) {
switch (CRM_Utils_Array::value('type', $this->_columns[$tableName][$fieldGrp][$fieldName])) {
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_INT;
break;
case CRM_Utils_Type::T_DATE:
- $this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_DATE;
+ $this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_DATE;
break;
case CRM_Utils_Type::T_BOOLEAN:
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_SELECT;
if (!array_key_exists('options', $this->_columns[$tableName][$fieldGrp][$fieldName])) {
- $this->_columns[$tableName][$fieldGrp][$fieldName]['options'] =
+ $this->_columns[$tableName][$fieldGrp][$fieldName]['options'] =
array('' => ts('Any'), '0' => ts('No'), '1' => ts('Yes'));
}
break;
default:
- if ($daoOrBaoName &&
- (array_key_exists('pseudoconstant', $this->_columns[$tableName][$fieldGrp][$fieldName])
+ if ($daoOrBaoName &&
+ (array_key_exists('pseudoconstant', $this->_columns[$tableName][$fieldGrp][$fieldName])
|| array_key_exists('enumValues', $this->_columns[$tableName][$fieldGrp][$fieldName]))
) {
// with multiple options operator-type is generally multi-select
// still be having their own select() method. We should fix them as and when encountered and move
// towards generalizing the select() method below.
function select() {
- $select = array();
+ $select = $this->_selectAliases = array();
foreach ($this->_columns as $tableName => $table) {
if (array_key_exists('fields', $table)) {
}
}
+ $this->_selectClauses = $select;
$this->_select = "SELECT " . implode(', ', $select) . " ";
}
array('title' => ts('Postal Code'),
'default' => CRM_Utils_Array::value('postal_code', $defaults, FALSE),
),
+ 'postal_code_suffix' =>
+ array('title' => ts('Postal Code Suffix'),
+ 'default' => CRM_Utils_Array::value('postal_code_suffix', $defaults, FALSE),
+ ),
'county_id' =>
array('title' => ts('County'),
'default' => CRM_Utils_Array::value('county_id', $defaults, FALSE),