From b6c8057d3a85a1058de20136f6acfee2f4f2f83c Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 15 Dec 2016 21:24:58 +0530 Subject: [PATCH] CRM-19288, fixed civicrm_contribution.tax_amount value for multiple participant registration ---------------------------------------- * CRM-19288: VAT not included for additional participant fee when registering for events https://issues.civicrm.org/jira/browse/CRM-19288 --- CRM/Event/Form/Registration/Confirm.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index e08c82d135..77ce52fe96 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -430,6 +430,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { $this->set('finalAmount', $this->_amount); } $participantCount = array(); + $taxAmount = $totalTaxAmount = 0; //unset the skip participant from params. //build the $participantCount array. @@ -442,7 +443,10 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { elseif ($participantNum) { $participantCount[$participantNum] = 'participant'; } - + $totalTaxAmount += CRM_Utils_Array::value('tax_amount', $record, 0); + if (CRM_Utils_Array::value('is_primary', $record)) { + $taxAmount = &$params[$participantNum]['tax_amount']; + } //lets get additional participant id to cancel. if ($this->_allowConfirmation && is_array($cancelledIds)) { $additonalId = CRM_Utils_Array::value('participant_id', $record); @@ -451,7 +455,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { } } } - + $taxAmount = $totalTaxAmount; $payment = $registerByID = $primaryCurrencyID = $contribution = NULL; $paymentObjError = ts('The system did not record payment details for this payment and so could not process the transaction. Please report this error to the site administrator.'); -- 2.25.1