Merge pull request #21101 from eileenmcnaughton/inv3
[civicrm-core.git] / CRM / Price / BAO / LineItem.php
index 2591f632e82ff0dee388415a8903b95ce3b7825a..59868a458b308c4eaafb1800f212d013da723dc3 100644 (file)
@@ -214,8 +214,6 @@ WHERE li.contribution_id = %1";
     ];
 
     $getTaxDetails = FALSE;
-    $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
-    $invoicing = $invoiceSettings['invoicing'] ?? NULL;
 
     $dao = CRM_Core_DAO::executeQuery("$selectClause $fromClause $whereClause $orderByClause", $params);
     while ($dao->fetch()) {
@@ -257,7 +255,7 @@ WHERE li.contribution_id = %1";
         $getTaxDetails = TRUE;
       }
     }
-    if ($invoicing) {
+    if (Civi::settings()->get('invoicing')) {
       // @todo - this is an inappropriate place to be doing form level assignments.
       $taxTerm = Civi::settings()->get('tax_term');
       $smarty = CRM_Core_Smarty::singleton();