X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FEventFees.php;h=6b9add1c4f5430514df5cb07863c5e2c2e92fd30;hb=24f8127938dec80960d388e50fd5b89aa450b494;hp=753417c8091d1c99cf3296ddf0b6587af0045977;hpb=71f4f2c6d8bd9e3a4a121bf47d0cc86aa8af0f33;p=civicrm-core.git diff --git a/CRM/Event/Form/EventFees.php b/CRM/Event/Form/EventFees.php index 753417c809..6b9add1c4f 100644 --- a/CRM/Event/Form/EventFees.php +++ b/CRM/Event/Form/EventFees.php @@ -380,8 +380,17 @@ SELECT id, html_type CRM_Event_Form_Registration::initEventFee($form, $event['id']); CRM_Event_Form_Registration_Register::buildAmount($form, TRUE, $form->_discountId); $lineItem = 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; if (!CRM_Utils_System::isNull(CRM_Utils_Array::value('line_items', $form->_values))) { $lineItem[] = $form->_values['line_items']; + foreach ($form->_values['line_items'] as $key => $value) { + $totalTaxAmount = $value['tax_amount'] + $totalTaxAmount; + } + } + if ($invoicing) { + $form->assign('totalTaxAmount', $totalTaxAmount); } $form->assign('lineItem', empty($lineItem) ? FALSE : $lineItem); $discounts = array();