From: Eileen McNaughton Date: Tue, 21 Nov 2023 06:26:55 +0000 (+1300) Subject: Fix getTaxDetails notices on Confirm page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=83fbbc303d43992f9a3c4c8a80a8af981cafab2d;p=civicrm-core.git Fix getTaxDetails notices on Confirm page --- diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index f302fe6927..f54b31133a 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -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; } diff --git a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl index 9d7847cf3c..e39176129d 100644 --- a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl @@ -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}: diff --git a/tests/templates/message_templates/contribution_online_receipt_html.tpl b/tests/templates/message_templates/contribution_online_receipt_html.tpl index d5e4e3a29c..c64fc579bd 100644 --- a/tests/templates/message_templates/contribution_online_receipt_html.tpl +++ b/tests/templates/message_templates/contribution_online_receipt_html.tpl @@ -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)}