From 438677282fcb64270b50bea2645067948e2a85b6 Mon Sep 17 00:00:00 2001 From: Johan Vervloet Date: Tue, 12 Aug 2014 21:30:20 +0200 Subject: [PATCH] CRM-15104 - Fixed a bug in query for price field value. The original query could return NULL instead of the actual price field value if the price set contains multiple price fields. ---------------------------------------- * CRM-15104: Line item issues when creating a participant using the API https://issues.civicrm.org/jira/browse/CRM-15104 --- api/v3/Participant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v3/Participant.php b/api/v3/Participant.php index 7a5bc7e216..c3a705b7e6 100644 --- a/api/v3/Participant.php +++ b/api/v3/Participant.php @@ -113,8 +113,8 @@ function _civicrm_api3_participant_createlineitem(&$params, $participant){ FROM civicrm_price_set_entity cpse LEFT JOIN civicrm_price_set ps ON cpse.price_set_id = ps.id AND cpse.entity_id = {$params['event_id']} AND cpse.entity_table = 'civicrm_event' LEFT JOIN civicrm_price_field pf ON pf.`price_set_id` = ps.id - LEFT JOIN civicrm_price_field_value pfv ON pfv.price_field_id = pf.id and pfv.label = '{$label}' - where ps.id is not null + LEFT JOIN civicrm_price_field_value pfv ON pfv.price_field_id = pf.id + where ps.id is not null and pfv.label = '{$label}' "; $dao = CRM_Core_DAO::executeQuery($sql); -- 2.25.1