From ee961ca76e01886cbf4b6546056bd9f1e66832ac Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 10 Oct 2019 11:03:09 +0200 Subject: [PATCH] Minor cleanup to determine taxterm with a helper function. Simple cleanup to reduce the lines of code and make it more greppable --- CRM/Contribute/BAO/Contribution.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 9c3a52b2e1..2ee39f1d2a 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -3772,8 +3772,6 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac $params['line_item'][$fieldId][$fieldValueId]['financial_item_id'] = $financialItem->id; if (($lineItemDetails['tax_amount'] && $lineItemDetails['tax_amount'] !== 'null') || ($context == 'changeFinancialType')) { - $invoiceSettings = Civi::settings()->get('contribution_invoice_settings'); - $taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings); $taxAmount = (float) $lineItemDetails['tax_amount']; if ($context == 'changeFinancialType' && $lineItemDetails['tax_amount'] === 'null') { // reverse the Sale Tax amount if there is no tax rate associated with new Financial Type @@ -3784,7 +3782,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac } if ($taxAmount != 0) { $itemParams['amount'] = self::getMultiplier($params['contribution']->contribution_status_id, $context) * $taxAmount; - $itemParams['description'] = $taxTerm; + $itemParams['description'] = CRM_Invoicing_Utils::getTaxTerm(); if ($lineItemDetails['financial_type_id']) { $itemParams['financial_account_id'] = CRM_Contribute_PseudoConstant::getRelationalFinancialAccount( $lineItemDetails['financial_type_id'], -- 2.25.1