From 8d13d078e6b7494df74bf3f3267233767e822782 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Fri, 14 Mar 2014 17:04:49 +0530 Subject: [PATCH] CRM-13973-qa : correct default price set fields selection display on fee selection screen --- CRM/Event/Form/EventFees.php | 4 ++-- CRM/Event/Form/ParticipantFeeSelection.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Event/Form/EventFees.php b/CRM/Event/Form/EventFees.php index ac26d648a3..af23d5fb53 100644 --- a/CRM/Event/Form/EventFees.php +++ b/CRM/Event/Form/EventFees.php @@ -256,7 +256,7 @@ class CRM_Event_Form_EventFees { * * @return void */ - static function setDefaultPriceSet($participantID, $eventID = NULL) { + static function setDefaultPriceSet($participantID, $eventID = NULL, $includeQtyZero = TRUE) { $defaults = array(); if (!$eventID && $participantID) { $eventID = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Participant', $participantID, 'event_id'); @@ -272,7 +272,7 @@ class CRM_Event_Form_EventFees { } // use line items for setdefault price set fields, CRM-4090 - $lineItems[$participantID] = CRM_Price_BAO_LineItem::getLineItems($participantID); + $lineItems[$participantID] = CRM_Price_BAO_LineItem::getLineItems($participantID, 'participant', NULL, $includeQtyZero); if (is_array($lineItems[$participantID]) && !CRM_Utils_System::isNull($lineItems[$participantID]) diff --git a/CRM/Event/Form/ParticipantFeeSelection.php b/CRM/Event/Form/ParticipantFeeSelection.php index 10d9d22d09..fcb6a836e4 100644 --- a/CRM/Event/Form/ParticipantFeeSelection.php +++ b/CRM/Event/Form/ParticipantFeeSelection.php @@ -108,7 +108,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form { CRM_Event_BAO_Participant::getValues($params, $defaults, $ids); $priceSetId = CRM_Price_BAO_PriceSet::getFor('civicrm_event', $this->_eventId); - $priceSetValues = CRM_Event_Form_EventFees::setDefaultPriceSet($this->_participantId, $this->_eventId); + $priceSetValues = CRM_Event_Form_EventFees::setDefaultPriceSet($this->_participantId, $this->_eventId, FALSE); if (!empty($priceSetValues)) { $defaults[$this->_participantId] = array_merge($defaults[$this->_participantId], $priceSetValues); } -- 2.25.1