diff --git a/includes/wf_crm_webform_base.inc b/includes/wf_crm_webform_base.inc index 653b60775..a7eab9daf 100755 --- a/includes/wf_crm_webform_base.inc +++ b/includes/wf_crm_webform_base.inc @@ -60,8 +60,8 @@ abstract class wf_crm_webform_base { return $this->_contribution_page; case 'tax_rate': - $taxSettings = wf_crm_get_civi_setting('contribution_invoice_settings'); - if (is_array($taxSettings) && !empty($taxSettings['invoicing'])) { + $taxInvoiceSetting = wf_crm_get_civi_setting('invoicing'); + if (!empty($taxInvoiceSetting)) { if ($this->contribution_page) { // tax integration $taxRates = CRM_Core_PseudoConstant::getTaxRates(); diff --git a/includes/wf_crm_webform_preprocess.inc b/includes/wf_crm_webform_preprocess.inc index b2ec1ac47..e7b6a1f2c 100644 --- a/includes/wf_crm_webform_preprocess.inc +++ b/includes/wf_crm_webform_preprocess.inc @@ -576,10 +576,11 @@ class wf_crm_webform_preprocess extends wf_crm_webform_base { if (!is_null($itemTaxRate)) { // Change the line item label to display the tax rate it contains - $taxSettings = wf_crm_get_civi_setting('contribution_invoice_settings'); + $taxDisplaySetting = wf_crm_get_civi_setting('tax_display_settings'); + $taxTerm = wf_crm_get_civi_setting('tax_term'); - if (($taxSettings['tax_display_settings'] != 'Do_not_show') && ($itemTaxRate !== 0)) { - $item['label'] .= ' (' . t('includes !rate @tax', ['!rate' => (float)$itemTaxRate . '%', '@tax' => $taxSettings['tax_term']]) . ')'; + if (($taxDisplaySetting != 'Do_not_show') && ($itemTaxRate !== 0)) { + $item['label'] .= ' (' . t('includes !rate @tax', ['!rate' => (float)$itemTaxRate . '%', '@tax' => $taxTerm]) . ')'; } // Add calculation for financial type that contains tax