'Relationship');
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
- /**
- *
- */
- /**
- *
- */
function __construct() {
$contact_type = CRM_Contact_BAO_ContactType::getSelectElements(FALSE, TRUE, '_');
'operator' => 'like',
'type' => CRM_Report_Form::OP_STRING,
),
+ 'contact_type_a' =>
+ array('title' => ts('Contact Type A'),
+ 'name' => 'contact_type',
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => $contact_type,
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
),
'grouping' => 'conact_a_fields',
),
'operator' => 'like',
'type' => CRM_Report_Form::OP_STRING,
),
+ 'contact_type_b' =>
+ array('title' => ts('Contact Type B'),
+ 'name' => 'contact_type',
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => $contact_type,
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
),
'grouping' => 'conact_b_fields',
),
'default' => TRUE,
),
),
- 'filters' =>
- array(
- 'contact_type_a' =>
- array('title' => ts('Contact Type A'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => $contact_type,
- 'type' => CRM_Utils_Type::T_STRING,
- ),
- 'contact_type_b' =>
- array('title' => ts('Contact Type B'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => $contact_type,
- 'type' => CRM_Utils_Type::T_STRING,
- ),
- ),
'grouping' => 'relation-fields',
),
'civicrm_relationship' =>
else {
$op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params);
if ($op) {
-
- if ($tableName == 'civicrm_relationship_type' &&
+ if (($tableName == 'civicrm_contact' || $tableName == 'civicrm_contact_b') &&
($fieldName == 'contact_type_a' || $fieldName == 'contact_type_b')
) {
$cTypes = CRM_Utils_Array::value("{$fieldName}_value", $this->_params);
}
if (!empty($contactSubTypes)) {
- if ($fieldName == 'contact_type_a') {
- $field['name'] = 'contact_sub_type_a';
- }
- else {
- $field['name'] = 'contact_sub_type_b';
- }
+ $field['name'] = 'contact_sub_type';
$field['dbAlias'] = $field['alias'] . '.' . $field['name'];
$subTypeClause = $this->whereClause($field,
$op,