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'];
$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'])) {