From 7030a0029d919e18184fa6292a239c5887f5313c Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 4 Apr 2013 16:23:40 +0530 Subject: [PATCH] --fixed for CRM-12275 --- CRM/Event/Form/Participant.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index ed22dc6af8..13919346af 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1440,6 +1440,10 @@ loadCampaign( {$this->_eID}, {$eventCampaigns} ); //insert financial type name in receipt. $this->assign('contributionTypeName', CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $contributionParams['financial_type_id'])); $contributionParams['skipLineItem'] = 1; + if ($this->_id) { + $contributionParams['contribution_mode'] = 'participant'; + $contributionParams['participant_id'] = $this->_id; + } // Set is_pay_later flag for back-office offline Pending status contributions if ($contributionParams['contribution_status_id'] == CRM_Core_OptionGroup::getValue('contribution_status', 'Pending', 'name')) { $contributionParams['is_pay_later'] = 1; @@ -1469,7 +1473,13 @@ loadCampaign( {$this->_eID}, {$eventCampaigns} ); // CRM-11124 if ($this->_quickConfig) { - CRM_Event_BAO_Participant::createDiscountTrxn($this->_eventId, $contributionParams, $this->_params['amount_priceset_level_radio']); + if (CRM_Utils_Array::value('amount_priceset_level_radio', $this->_params)) { + $feeLevel = $this->_params['amount_priceset_level_radio']; + } + else { + $feeLevel[] = $this->_params['fee_level'] ; + } + CRM_Event_BAO_Participant::createDiscountTrxn($this->_eventId, $contributionParams, $feeLevel); } $transaction->commit(); } -- 2.25.1