X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FParticipant.php;h=59ccd6772a104c4fece32b5d44b3da11b826ea2c;hb=c71d4550ef1244cbbc814714d2c1df9f32119223;hp=61ee14ca0406c5a368932d298fdbbb6913ac7fb5;hpb=b5498275f878d2163996089864953e53584a1993;p=civicrm-core.git diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 61ee14ca04..59ccd6772a 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1659,8 +1659,6 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment CRM_Event_Form_Registration::initEventFee($form, $event['id'], FALSE); CRM_Event_Form_Registration_Register::buildAmount($form, TRUE, $form->_discountId); $lineItem = []; - $invoiceSettings = Civi::settings()->get('contribution_invoice_settings'); - $invoicing = $invoiceSettings['invoicing'] ?? NULL; $totalTaxAmount = 0; if (!CRM_Utils_System::isNull(CRM_Utils_Array::value('line_items', $form->_values))) { $lineItem[] = $form->_values['line_items']; @@ -1668,9 +1666,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment $totalTaxAmount = $value['tax_amount'] + $totalTaxAmount; } } - if ($invoicing) { - $form->assign('totalTaxAmount', $totalTaxAmount); - } + $form->assign('totalTaxAmount', Civi::settings()->get('invoicing') ? ($totalTaxAmount ?? NULL) : NULL); $form->assign('lineItem', empty($lineItem) ? FALSE : $lineItem); $discounts = []; if (!empty($form->_values['discount'])) {