Smarty modifier - stop using isset to check taxTerm
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 27 Dec 2021 07:46:40 +0000 (20:46 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 31 Dec 2021 03:27:22 +0000 (16:27 +1300)
I'm thinking this should fail on some notices on CI - so will follow with the fix

17 files changed:
CRM/Utils/String.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ContributionTest.php
tests/templates/message_templates/contribution_online_receipt_html.tpl
xml/templates/message_templates/contribution_invoice_receipt_html.tpl
xml/templates/message_templates/contribution_offline_receipt_html.tpl
xml/templates/message_templates/contribution_offline_receipt_text.tpl
xml/templates/message_templates/contribution_online_receipt_html.tpl
xml/templates/message_templates/contribution_online_receipt_text.tpl
xml/templates/message_templates/event_offline_receipt_html.tpl
xml/templates/message_templates/event_offline_receipt_text.tpl
xml/templates/message_templates/event_online_receipt_html.tpl
xml/templates/message_templates/event_online_receipt_text.tpl
xml/templates/message_templates/membership_offline_receipt_html.tpl
xml/templates/message_templates/membership_offline_receipt_text.tpl
xml/templates/message_templates/membership_online_receipt_html.tpl
xml/templates/message_templates/membership_online_receipt_text.tpl

index 3400263aa06bd4afa9cdc3b3489befe5df813fea..1cb1e8cbc28db52ad8c0ca55acfe769c8f2b5a1a 100644 (file)
@@ -1038,7 +1038,9 @@ class CRM_Utils_String {
     $cachingValue = $smarty->caching;
     $smarty->caching = 0;
     $smarty->assign('smartySingleUseString', $templateString);
-    $templateString = $smarty->fetch('string:{eval var=$smartySingleUseString}');
+    // Do not escape the smartySingleUseString as that is our smarty template
+    // and is likely to contain html.
+    $templateString = (string) $smarty->fetch('string:{eval var=$smartySingleUseString|smarty:nodefaults}');
     $smarty->caching = $cachingValue;
     $smarty->assign('smartySingleUseString', NULL);
     return $templateString;
index c67f327ce38e4fc2f08c54330ae79971235de31d..bf0ca8949bb2ed5b4df3c851e46c70ea998d2b62 100644 (file)
@@ -2733,7 +2733,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
    * @param string $templateName
    * @param string $type
    */
-  protected function swapMessageTemplateForTestTemplate($templateName = 'contribution_online_receipt', $type = 'html') {
+  protected function swapMessageTemplateForTestTemplate($templateName = 'contribution_online_receipt', $type = 'html'): void {
     $testTemplate = file_get_contents(__DIR__ . '/../../templates/message_templates/' . $templateName . '_' . $type . '.tpl');
     CRM_Core_DAO::executeQuery(
       "UPDATE civicrm_msg_template
index 0fc48fdca917892947ba5d314a900abdc23735c1..113083f59454167706bd90ac971881879a7df279 100644 (file)
@@ -2082,7 +2082,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   /**
    * Test completing a transaction via the API with a non-USD transaction.
    */
-  public function testCompleteTransactionEuro() {
+  public function testCompleteTransactionEuro(): void {
     $mut = new CiviMailUtils($this, TRUE);
     $this->swapMessageTemplateForTestTemplate();
     $this->createLoggedInUser();
index 8f98967aec4d2168baff55f513e212a39d4f9a71..eba77796a5d3efe22be235ef0701d0593832bb58 100644 (file)
   contactID:::{$contactID}
   contributionID:::{$contributionID}
   amount:::{$amount}
-  {if isset($amount_level)}
+  {if !empty($amount_level)}
   amount_level:::{$amount_level}
   {/if}
-  {if isset($pay_later_receipt)}
+  {if !empty($pay_later_receipt)}
   pay_later_receipt:::{$pay_later_receipt}
   {/if}
-  {if isset($headerstyle)}
+  {if !empty($headerstyle)}
   headerStyle:::{$headerStyle}
   {/if}
-  {if isset($valueStyle)}
+  {if !empty($valueStyle)}
   valueStyle:::{$valueStyle}
   {/if}
-  {if isset($labelStyle)}
+  {if !empty($labelStyle)}
   labelStyle:::{$labelStyle}
   {/if}
   priceSetID:::{$priceSetID}
   getTaxDetails:::{$getTaxDetails}
   totalTaxAmount:::{$totalTaxAmount}
   {/if}
-  {if isset($is_monetary)}
+  {if !empty($is_monetary)}
   is_monetary:::{$is_monetary}
   {/if}
-  {if isset($isShare)}
+  {if !empty($isShare)}
   isShare:::{$isShare}
   {/if}
   honor_block_is_active:::{$honor_block_is_active}
   {if $honor_block_is_active}
   soft_credit_type:::{$soft_credit_type}
   {/if}
-  {if isset($is_recur)}
+  {if !empty($is_recur)}
   is_recur:::{$is_recur}
   {/if}
-  {if isset($trxn_id)}
+  {if !empty($trxn_id)}
   trxn_id:::{$trxn_id}
   {/if}
-  {if isset($cancelSubscriptionUrl)}
+  {if !empty($cancelSubscriptionUrl)}
   cancelSubscriptionUrl:::{$cancelSubscriptionUrl}
   updateSubscriptionBillingUrl:::{$updateSubscriptionBillingUrl}
   updateSubscriptionUrl:::{$updateSubscriptionUrl}
   {/if}
-  {if isset($priceset)}
+  {if !empty($priceset)}
   priceset:::{$priceset}
   {/if}
-  {if isset($taxTerm)}
+  {if !empty($taxTerm)}
   taxTerm:::{$taxTerm}
   {/if}
   {if !empty($pcpBlock)}
   pcp_roll_nickname:::{$pcp_roll_nickname}
   pcp_personal_note:::{$pcp_personal_note}
   {/if}
-  {if isset($onBehalfProfile_grouptitle)}
+  {if !empty($onBehalfProfile_grouptitle)}
   onBehalfProfile_grouptitle:::{$onBehalfProfile_grouptitle}
   {/if}
   email:::{$email}
-  {if isset($contributionPageId)}
+  {if !empty($contributionPageId)}
   contributionPageId:::{$contributionPageId}
   title:::{$title}
   {/if}
-  {if isset($isBillingAddressRequiredForPayLater)}
+  {if !empty($isBillingAddressRequiredForPayLater)}
   isBillingAddressRequiredForPayLater:::{$isBillingAddressRequiredForPayLater}
   {/if}
-  {if isset($billingName)}
+  {if !empty($billingName)}
   billingName:::{$billingName}
   address:::{$address}
   {/if}
-  {if isset($credit_card_type)}
+  {if !empty($credit_card_type)}
   credit_card_type:::{$credit_card_type}
   credit_card_number:::{$credit_card_number}
   credit_card_exp_date:::{$credit_card_exp_date}
   {/if}
-  {if isset($selectPremium)}
+  {if !empty($selectPremium)}
   selectPremium:::{$selectPremium}
   product_name:::{$product_name}
   option:::{$option}
   sku:::{$sku}
   {/if}
-  {if isset($start_date)}
+  {if !empty($start_date)}
   start_date:::{$start_date}
   end_date:::{$end_date}
   {/if}
-  {if isset($is_deductible)}
+  {if !empty($is_deductible)}
   is_deductible:::{$is_deductible}
   {/if}
-  {if isset($contact_email)}
+  {if !empty($contact_email)}
   contact_email:::{$contact_email}
   {/if}
-  {if isset($contact_phone)}
+  {if !empty($contact_phone)}
   contact_phone:::{$contact_phone}
   {/if}
-  {if isset($price)}
+  {if !empty($price)}
   price:::{$price}
   {/if}
-  {if isset($customPre_grouptitle)}
+  {if !empty($customPre_grouptitle)}
   customPre_grouptitle:::{$customPre_grouptitle}
   {/if}
-  {if isset($customPost_grouptitle)}
+  {if !empty($customPost_grouptitle)}
   customPost_grouptitle:::{$customPost_grouptitle}
   {/if}
   contributionStatus:::{$contributionStatus}
- {if isset($lineItem)}
+ {if !empty($lineItem)}
  {foreach from=$lineItem item=value key=priceset}
   {foreach from=$value item=line}
      line.html_type:::{$line.html_type}
      line.description:::{$line.description}
      line.qty:::{$line.qty}
      line.unit_price:::{$line.unit_price}
-     {if isset($line.tax_rate)}
+     {if !empty($line.tax_rate)}
      line.tax_rate:::{$line.tax_rate}
      line.tax_amount:::{$line.tax_amount}
      {/if}
index 05ebb636b7a5b77abe9d730e2d3c053bab08142a..712a447a032669fb532c8e5ac453c6cedb8576eb 100644 (file)
@@ -75,7 +75,7 @@
                 <th style="text-align:left;font-weight:bold;width:100%"><font size="1">{ts}Description{/ts}</font></th>
                 <th style="text-align:right;font-weight:bold;white-space: nowrap"><font size="1">{ts}Quantity{/ts}</font></th>
                 <th style="text-align:right;font-weight:bold;white-space: nowrap"><font size="1">{ts}Unit Price{/ts}</font></th>
-                <th style="text-align:right;font-weight:bold;white-space: nowrap"><font size="1">{if isset($taxTerm)}{$taxTerm}{/if}</font></th>
+                <th style="text-align:right;font-weight:bold;white-space: nowrap"><font size="1">{$taxTerm}</font></th>
                 <th style="text-align:right;font-weight:bold;white-space: nowrap"><font size="1">{ts 1=$currency}Amount %1{/ts}</font></th>
               </tr>
               {foreach from=$lineItem item=value key=priceset name=taxpricevalue}
@@ -99,7 +99,7 @@
                   {if $value.tax_amount != ''}
                     <td style="text-align:right;"><font size="1">{if isset($value.tax_rate)}{$value.tax_rate}%{/if}</font></td>
                   {else}
-                    <td style="text-align:right;"><font size="1">{if isset($taxTerm)}{ts 1=$taxTerm}-{/ts}{/if}</font></td>
+                    <td style="text-align:right;"><font size="1">{if $taxTerm}{ts 1=$taxTerm}-{/ts}{/if}</font></td>
                   {/if}
                   <td style="text-align:right;"><font size="1">{$value.subTotal|crmMoney:$currency}</font></td>
                 </tr>
                 <tr>
                   <td colspan="3"></td>
                     {if $priceset}
-                      <td style="text-align:right;white-space: nowrap"><font size="1">{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}</font></td>
+                      <td style="text-align:right;white-space: nowrap"><font size="1">{if $taxTerm}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}</font></td>
                       <td style="text-align:right"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
                     {elseif $priceset == 0}
-                      <td style="text-align:right;white-space: nowrap"><font size="1">{if isset($taxTerm)}{ts 1=$taxTerm}TOTAL %1{/ts}{/if}</font></td>
+                      <td style="text-align:right;white-space: nowrap"><font size="1">{if $taxTerm}{ts 1=$taxTerm}TOTAL %1{/ts}{/if}</font></td>
                       <td style="text-align:right"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
                     {/if}
                 </tr>
                 <th style="padding-right:28px;text-align:left;font-weight:bold;width:200px;"><font size="1">{ts}Description{/ts}</font></th>
                 <th style="padding-left:28px;text-align:right;font-weight:bold;"><font size="1">{ts}Quantity{/ts}</font></th>
                 <th style="padding-left:28px;text-align:right;font-weight:bold;"><font size="1">{ts}Unit Price{/ts}</font></th>
-                <th style="padding-left:28px;text-align:right;font-weight:bold;"><font size="1">{if isset($taxTerm)}{$taxTerm}{/if}</font></th>
+                <th style="padding-left:28px;text-align:right;font-weight:bold;"><font size="1">{$taxTerm}</font></th>
                 <th style="padding-left:28px;text-align:right;font-weight:bold;"><font size="1">{ts 1=$currency}Amount %1{/ts}</font></th>
               </tr>
               {foreach from=$lineItem item=value key=priceset name=pricevalue}
                   {if $value.tax_amount != ''}
                     <td style="padding-left:28px;text-align:right;"><font size="1">{if isset($value.tax_rate)}{$value.tax_rate}%{/if}</font></td>
                   {else}
-                    <td style="padding-left:28px;text-align:right"><font size="1">{if isset($taxTerm)}{ts 1=$taxTerm}No %1{/ts}{/if}</font></td>
+                    <td style="padding-left:28px;text-align:right"><font size="1">{if $taxTerm}{ts 1=$taxTerm}No %1{/ts}{/if}</font></td>
                   {/if}
                   <td style="padding-left:28px;text-align:right;"><font size="1">{$value.subTotal|crmMoney:$currency}</font></td>
                 </tr>
                 <tr>
                   <td colspan="3"></td>
                   {if $priceset}
-                    <td style="padding-left:28px;text-align:right;"><font size="1">{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}</font></td>
+                    <td style="padding-left:28px;text-align:right;"><font size="1">{if $taxTerm}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}</font></td>
                     <td style="padding-left:28px;text-align:right;"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
                   {elseif $priceset == 0}
-                    <td style="padding-left:28px;text-align:right;"><font size="1">{if isset($taxTerm)}{ts 1=$taxTerm}TOTAL NO %1{/ts}{/if}</font></td>
+                    <td style="padding-left:28px;text-align:right;"><font size="1">{if $taxTerm}{ts 1=$taxTerm}TOTAL NO %1{/ts}{/if}</font></td>
                     <td style="padding-left:28px;text-align:right;"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
                   {/if}
                 </tr>
index e74a4ab6228c7f5eb977e47d0fe3cf907962f2b5..331e115591ebbf49d49f1e99e4bb259cbb78769d 100644 (file)
       {foreach from=$dataArray item=value key=priceset}
         <tr>
         {if $priceset ||  $priceset == 0 || $value != ''}
-          <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
+          <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
           <td>&nbsp;{$value|crmMoney:$currency}</td>
         {else}
-          <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
+          <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
           <td>&nbsp;{$value|crmMoney:$currency}</td>
         {/if}
         </tr>
index 8e8f878f9645765ab3114fe025f985f850d65767..75091e234d9598c37a4e095b26fc7f960b647f66 100644 (file)
@@ -37,9 +37,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset ||  $priceset == 0 || $value != ''}
-{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
+{$taxTerm} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if} : {$value|crmMoney:$currency}
+{ts}No{/ts} {$taxTerm} : {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 363aef9fc919f2dc7f35c8f09ff462a1afe99f67..a05185bd7cdc0037e7dc213ef70ba03a06dcc1a6 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
          <tr>
           {if $priceset || $priceset == 0}
-           <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
+           <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {else}
-           <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
+           <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {/if}
          </tr>
index 87d01e7120fb8a7e7a1a0ac72d7fa17e9e050244..5782ea423e151d110a6195dbde3b12dbbbd8dcc5 100644 (file)
@@ -5,7 +5,7 @@
 {if $is_pay_later}
 
 ===========================================================
-{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
+{$pay_later_receipt}
 ===========================================================
 {/if}
 
@@ -38,9 +38,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index b3748bcab7fe37a7b0f61b4592c27ce30a24cd3b..5068249e8090fcee5a482e81348edb1a1bab5a97 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
           <tr>
            {if $priceset || $priceset == 0}
-            <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
+            <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
             <td>&nbsp;{$value|crmMoney:$currency}</td>
            {else}
-            <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
+            <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
             <td>&nbsp;{$value|crmMoney:$currency}</td>
            {/if}
           </tr>
index c5c1741a81f9c9af78475e3eaa341952874689b0..4b7e95e9f873e1a7a260fe11edcaccaef3b7b21b 100644 (file)
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 41e510a58b087a87834a7a18be605a869f29ff1b..6787823789a79a3d572bbed59c67d8add2bcb331 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
          <tr>
           {if $priceset || $priceset == 0}
-           <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
+           <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {else}
-           <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
+           <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {/if}
          </tr>
index e3dbd3835eb4ebf41873a17261bab4fce1e0d367..50512cdfa2de9d005b0cfe585b826fe48ef79ec3 100644 (file)
@@ -145,9 +145,9 @@ You were registered by: {$payer.name}
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 9012b9a46bbbf7c6c4c8c9d07502fb4043ae61e0..034a49975d9c9dd2d98276764d9ced066056bbe6 100644 (file)
                   {foreach from=$dataArray item=value key=priceset}
                     <tr>
                       {if $priceset}
-                        <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
+                        <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
                         <td>&nbsp;{$value|crmMoney:$currency}</td>
                       {elseif  $priceset == 0}
-                        <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
+                        <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
                         <td>&nbsp;{$value|crmMoney:$currency}</td>
                       {/if}
                     </tr>
index 0817ad6bb4d77719a2755b2e28f2c1e558915b32..715aff3654714a92997ba38fe3453b6c9b2db06e 100644 (file)
@@ -52,9 +52,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset}
-{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"} %: {$value|crmMoney:$currency}
+{$taxTerm} {$priceset|string_format:"%.2f"} %: {$value|crmMoney:$currency}
 {elseif  $priceset == 0}
-{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 9e2ceb6268b68a81dbc1a07866b415710aec0d28..35f4fbbb116455580e1578e2afabb03288a2d14c 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
          <tr>
          {if $priceset || $priceset == 0}
-           <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
+           <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
          {else}
-           <td>&nbsp;{ts}NO{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
+           <td>&nbsp;{ts}NO{/ts} {$taxTerm}</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
          {/if}
          </tr>
index e85feaeec601001990d1484d4f7973f4695b9d49..d1647bdbe20fdb61854e4b865cb214d4ea63d03b 100644 (file)
@@ -74,9 +74,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}