From 7c75c017a7427522c4d16d2842f525a9aa4ffd68 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Tue, 7 Oct 2014 18:28:37 +0530 Subject: [PATCH] CRM-15379 - Find Participants : Actual participant count is incorrect when multiple price field options are selected https://issues.civicrm.org/jira/browse/CRM-15379 --- CRM/Event/Form/Search.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index 1e3aafd0ad..f69f4d63b9 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -212,6 +212,13 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { $roles = array_keys($this->_formValues['participant_role_id']); $seatClause[] = '( participant.role_id IN ( ' . implode(' , ', $roles) . ' ) )'; } + // CRM-15379 + if (!empty($this->_formValues['participant_fee_id'])) { + $participant_fee_id = $this->_formValues['participant_fee_id']; + $feeLabel = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceFieldValue', $participant_fee_id, 'label'); + $feeLabel = CRM_Core_DAO::escapeString(trim($feeLabel)); + $seatClause[] = "( participant.fee_level LIKE '%$feeLabel%' )"; + } $clause = NULL; if (!empty($seatClause)) { $clause = implode(' AND ', $seatClause); -- 2.25.1