Skip to content

Commit

Permalink
Merge pull request #936 from demeritcowboy/inv
Browse files Browse the repository at this point in the history
Deprecated settings
  • Loading branch information
demeritcowboy authored Jan 8, 2024
2 parents a76e094 + fcfd561 commit 6a466fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/WebformCivicrmBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ function __get($name) {
return $this->_payment_processor;

case 'tax_rate':
$taxSettings = $this->utils->wf_crm_get_civi_setting('contribution_invoice_settings');
if (is_array($taxSettings) && !empty($taxSettings['invoicing'])) {
if (\Civi::settings()->get('invoicing')) {
$contribution_enabled = wf_crm_aval($this->data, 'contribution:1:contribution:1:enable_contribution');
if ($contribution_enabled) {
// tax integration
Expand Down
6 changes: 2 additions & 4 deletions src/WebformCivicrmPreProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,8 @@ private function displayLineItems() {

if ($itemTaxRate !== NULL) {
// Change the line item label to display the tax rate it contains
$taxSettings = $this->utils->wf_crm_get_civi_setting('contribution_invoice_settings');

if (($itemTaxRate !== 0) && ($taxSettings['tax_display_settings'] !== 'Do_not_show')) {
$item['label'] .= ' (' . t('includes @rate @tax', ['@rate' => (float) $itemTaxRate . '%', '@tax' => $taxSettings['tax_term']]) . ')';
if (($itemTaxRate !== 0) && (\Civi::settings()->get('tax_display_settings') !== 'Do_not_show')) {
$item['label'] .= ' (' . t('includes @rate @tax', ['@rate' => (float) $itemTaxRate . '%', '@tax' => \Civi::settings()->get('tax_term')]) . ')';
}

// Add calculation for financial type that contains tax
Expand Down

0 comments on commit 6a466fe

Please sign in to comment.