";
if (isset($caseType)) {
$query .=
-"INNER JOIN civicrm_case_type ON civicrm_case_type.id = ca.case_type_id
+ "INNER JOIN civicrm_case_type ON civicrm_case_type.id = ca.case_type_id
WHERE cc.contact_id = %1 AND civicrm_case_type.name = '{$caseType}'";
}
if (!isset($caseType)) {
t_act.act_type_name as case_recent_activity_type_name,
t_act.act_type AS case_recent_activity_type ";
}
- elseif ( $type == 'any' ) {
- $query .= "
+ elseif ($type == 'any') {
+ $query .= "
t_act.desired_date as case_activity_date,
t_act.id as case_activity_id,
t_act.act_type_name as case_activity_type_name,
LEFT JOIN civicrm_option_value aov ON ( aov.option_group_id = aog.id AND aov.value = act.activity_type_id )
) AS t_act ";
}
- elseif ( $type == 'any' ) {
+ elseif ($type == 'any') {
$query .= " LEFT JOIN
(
SELECT ca4.case_id, act4.id AS id, act4.activity_date_time AS desired_date, act4.activity_type_id, act4.status_id, aov.name AS act_type_name, aov.label AS act_type
elseif ($type == 'recent') {
$query .= " ORDER BY case_recent_activity_date ASC ";
}
- elseif ( $type == 'any' ) {
+ elseif ($type == 'any') {
$query .= " ORDER BY case_activity_date ASC ";
}
if (!$allCases) {
$condition .= " AND case_relationship.contact_id_b = {$userID} ";
}
- if ( $type == 'upcoming' || $type == 'any' ) {
+ if ($type == 'upcoming' || $type == 'any') {
$closedId = CRM_Core_OptionGroup::getValue('case_status', 'Closed', 'name');
$condition .= "
AND civicrm_case.status_id != $closedId";
$resultFields[] = 'case_recent_activity_type';
$resultFields[] = 'case_recent_activity_id';
}
- elseif ( $type == 'any' ) {
+ elseif ($type == 'any') {
$resultFields[] = 'case_activity_date';
$resultFields[] = 'case_activity_type_name';
$resultFields[] = 'case_activity_type';