VAT-414 The system public pages should be updated to show the VAT/Tax breakdown for...
[civicrm-core.git] / CRM / Event / Form / ParticipantView.php
index 0f4faa706a61d63e9a76bb94d204eee59b9f0951..815a4ead2440d0065d945716ae224e22fb1c71b3 100644 (file)
@@ -179,11 +179,14 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form {
     $displayName = CRM_Contact_BAO_Contact::displayName($values[$participantID]['contact_id']);
 
     $participantCount = array();
+    $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;
     }
+    $this->assign('totalTaxAmount', $totalTaxAmount);
     if ($participantCount) {
       $this->assign('pricesetFieldsCount', $participantCount);
     }