X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FParticipantView.php;h=1429ce2119f53b965645922102bb16409dbbcf6f;hb=6327b760fa13ddc865aafb0486c090073dede3d8;hp=0f4faa706a61d63e9a76bb94d204eee59b9f0951;hpb=9c7ec7086d8984dcc3dc11f643bfa0f4b3c6eeda;p=civicrm-core.git diff --git a/CRM/Event/Form/ParticipantView.php b/CRM/Event/Form/ParticipantView.php index 0f4faa706a..1429ce2119 100644 --- a/CRM/Event/Form/ParticipantView.php +++ b/CRM/Event/Form/ParticipantView.php @@ -179,10 +179,17 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form { $displayName = CRM_Contact_BAO_Contact::displayName($values[$participantID]['contact_id']); $participantCount = array(); + $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,'contribution_invoice_settings'); + $invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings); + $totalTaxAmount = 0; foreach ($lineItem as $k => $v) { if (CRM_Utils_Array::value('participant_count', $lineItem[$k]) > 0) { $participantCount[] = $lineItem[$k]['participant_count']; } + $totalTaxAmount = $v['tax_amount'] + $totalTaxAmount; + } + if ($invoicing) { + $this->assign('totalTaxAmount', $totalTaxAmount); } if ($participantCount) { $this->assign('pricesetFieldsCount', $participantCount);