Fix getTaxDetails notices on Confirm page
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 21 Nov 2023 06:26:55 +0000 (19:26 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 21 Nov 2023 06:26:55 +0000 (19:26 +1300)
CRM/Price/BAO/LineItem.php
templates/CRM/Contribute/Form/Contribution/Confirm.tpl
tests/templates/message_templates/contribution_online_receipt_html.tpl

index f302fe692786561d1c5cc2d564e859a7b4924792..f54b31133aeb908de25c9329ea129c0d52f07f75 100644 (file)
@@ -257,13 +257,6 @@ WHERE li.contribution_id = %1";
         $getTaxDetails = TRUE;
       }
     }
-    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();
-      $smarty->assign('taxTerm', $taxTerm);
-      $smarty->assign('getTaxDetails', $getTaxDetails);
-    }
     return $lineItems;
   }
 
index 9d7847cf3c3d11021235dbfbd74462f1581177a3..e39176129d35ae69cfa89f746f3b458e9ddd22bf 100644 (file)
@@ -36,7 +36,7 @@
         {if $isDisplayLineItems && $lineItem}
           {if !$amount}{assign var="amount" value=0}{/if}
           {assign var="totalAmount" value=$amount}
-          {include file="CRM/Price/Page/LineItem.tpl" context="Contribution" displayLineItemFinancialType=false pricesetFieldsCount=false currencySymbol='' hookDiscount=''}
+          {include file="CRM/Price/Page/LineItem.tpl" context="Contribution" getTaxDetails=$totalTaxAmount displayLineItemFinancialType=false pricesetFieldsCount=false currencySymbol='' hookDiscount=''}
         {elseif $is_separate_payment}
           {if $amount AND $minimum_fee}
             {$membership_name} {ts}Membership{/ts}:
index d5e4e3a29c9a3964de1dc471b2be53e2cdd4c79a..c64fc579bdacc9fe7e6d34f1b7fa6f4c1c92d82d 100644 (file)
@@ -34,8 +34,7 @@
   {if !empty($is_quick_config)}
   is_quick_config:::{$is_quick_config}
   {/if}
-  {if !empty($getTaxDetails)}
-  getTaxDetails:::{$getTaxDetails}
+  {if !empty($totalTaxAmount)}
   totalTaxAmount:::{$totalTaxAmount}
   {/if}
   {if !empty($is_monetary)}