[php8-compat][REF] Fix api_v3_contributionpagetest on php8
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 6 Jun 2021 07:54:13 +0000 (07:54 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Sun, 6 Jun 2021 07:54:13 +0000 (07:54 +0000)
13 files changed:
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 91ab088c2263ca2f2f239b536f4d30ac81056dd3..0ee96917501414467ef3a14c6c0b8d2d81337021 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">{$taxTerm}</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">{ts 1=$currency}Amount %1{/ts}</font></th>
               </tr>
               {foreach from=$lineItem item=value key=priceset name=taxpricevalue}
@@ -97,9 +97,9 @@
                   <td style="text-align:right;"><font size="1">{$value.qty}</font></td>
                   <td style="text-align:right;"><font size="1">{$value.unit_price|crmMoney:$currency}</font></td>
                   {if $value.tax_amount != ''}
-                    <td style="text-align:right;"><font size="1">{$value.tax_rate}%</font></td>
+                    <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">{ts 1=$taxTerm}-{/ts}</font></td>
+                    <td style="text-align:right;"><font size="1">{if isset($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">{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}</font></td>
+                      <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"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
                     {elseif $priceset == 0}
-                      <td style="text-align:right;white-space: nowrap"><font size="1">{ts 1=$taxTerm}TOTAL %1{/ts}</font></td>
+                      <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"><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">{$taxTerm}</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">{ts 1=$currency}Amount %1{/ts}</font></th>
               </tr>
               {foreach from=$lineItem item=value key=priceset name=pricevalue}
                   <td style="padding-left:28px;text-align:right;"><font size="1">{$value.qty}</font></td>
                   <td style="padding-left:28px;text-align:right;"><font size="1">{$value.unit_price|crmMoney:$currency}</font></td>
                   {if $value.tax_amount != ''}
-                    <td style="padding-left:28px;text-align:right;"><font size="1">{$value.tax_rate}%</font></td>
+                    <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">{ts 1=$taxTerm}No %1{/ts}</font></td>
+                    <td style="padding-left:28px;text-align:right"><font size="1">{if isset($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">{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}</font></td>
+                    <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" align="right">{$value|crmMoney:$currency}</font> </td>
                   {elseif $priceset == 0}
-                    <td style="padding-left:28px;text-align:right;"><font size="1">{ts 1=$taxTerm}TOTAL NO %1{/ts}</font></td>
+                    <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" align="right">{$value|crmMoney:$currency}</font> </td>
                   {/if}
                 </tr>
index 1ce25413a04192c52819fbe170dd98e6eb781139..03a0fbb5b9d87fd003abc64ba0e969d12899fd38 100644 (file)
       {foreach from=$dataArray item=value key=priceset}
         <tr>
         {if $priceset ||  $priceset == 0 || $value != ''}
-          <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+          <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
           <td>&nbsp;{$value|crmMoney:$currency}</td>
         {else}
-          <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
+          <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
           <td>&nbsp;{$value|crmMoney:$currency}</td>
         {/if}
         </tr>
index c21cc9797a48e1d0bb06a5fd8b204968950fe916..8776aa8772d0a0cc047088ba126aaf272e6b1b72 100644 (file)
@@ -27,7 +27,7 @@
 {$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($getTaxDetails)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
 ----------------------------------------------------------
 {foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($getTaxDetails)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} %   {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if} {/if}   {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($getTaxDetails)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")} {$line.tax_rate|string_format:"%.2f"} %   {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if} {/if}   {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
 {/foreach}
 {/foreach}
 {/if}
@@ -37,9 +37,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset ||  $priceset == 0 || $value != ''}
-{$taxTerm} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
+{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {$taxTerm} : {$value|crmMoney:$currency}
+{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if} : {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 280e236f5376653ae9d9eda3cf7d0bf4617362d0..51ae892849c230c11daaa4e17d3e15861e6e4123 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
          <tr>
           {if $priceset || $priceset == 0}
-           <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+           <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {else}
-           <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
+           <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {/if}
          </tr>
index 8a0068d5f245a64b96ca757a422d3a9c29f8cf03..87d01e7120fb8a7e7a1a0ac72d7fa17e9e050244 100644 (file)
@@ -29,7 +29,7 @@
 {$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
 ----------------------------------------------------------
 {foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($dataArray)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($dataArray)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
 {/foreach}
 {/foreach}
 
@@ -38,9 +38,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index daa4c2e5af2e4bcb235639796f25fa5bd0f946bf..5d7e661646194d32dc2446f6988f9647e295486c 100644 (file)
                <td>
                 {$line.unit_price*$line.qty|crmMoney}
                </td>
-               {if $line.tax_rate != "" || $line.tax_amount != ""}
+               {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
                 <td>
                  {$line.tax_rate|string_format:"%.2f"}%
                 </td>
         {foreach from=$dataArray item=value key=priceset}
           <tr>
            {if $priceset || $priceset == 0}
-            <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+            <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
             <td>&nbsp;{$value|crmMoney:$currency}</td>
            {else}
-            <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
+            <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
             <td>&nbsp;{$value|crmMoney:$currency}</td>
            {/if}
           </tr>
index d13ea7ddb5d8ea7ada988b8541162e5b11ba1446..c250fc316d79bfb13c57fc780167f1b8c11c2cb2 100644 (file)
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 30b1e258bd3a0b3635918daad19b0a4382d172af..2d37975d052bd88c12aa8f51f9e0558c082c5dd9 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
          <tr>
           {if $priceset || $priceset == 0}
-           <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+           <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {else}
-           <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
+           <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
           {/if}
          </tr>
index c17bf558a333ba0375499ae936821db5aec41cd7..fba539841ab8d42c07045316f77c49b3e563a979 100644 (file)
@@ -143,9 +143,9 @@ You were registered by: {$payer.name}
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index 9de7e49895b2df0038ab6d8a7e21e3095a079d64..7a47a7717a7141e553d0573b751826deeaebfacb 100644 (file)
                               <td>
                                 {$line.unit_price*$line.qty|crmMoney}
                               </td>
-                              {if $line.tax_rate and ($line.tax_rate != "" || $line.tax_amount != "")}
+                              {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
                                 <td>
                                   {$line.tax_rate|string_format:"%.2f"}%
                                 </td>
                   {foreach from=$dataArray item=value key=priceset}
                     <tr>
                       {if $priceset}
-                        <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+                        <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
                         <td>&nbsp;{$value|crmMoney:$currency}</td>
                       {elseif  $priceset == 0}
-                        <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
+                        <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
                         <td>&nbsp;{$value|crmMoney:$currency}</td>
                       {/if}
                     </tr>
index 715aff3654714a92997ba38fe3453b6c9b2db06e..0817ad6bb4d77719a2755b2e28f2c1e558915b32 100644 (file)
@@ -52,9 +52,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset}
-{$taxTerm} {$priceset|string_format:"%.2f"} %: {$value|crmMoney:$currency}
+{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"} %: {$value|crmMoney:$currency}
 {elseif  $priceset == 0}
-{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}
index a2b1b461332efe9211b97e11d0870031ee6a7462..acb379db19bb0bbaf96440e1d4dba14ab0d2c838 100644 (file)
         {foreach from=$dataArray item=value key=priceset}
          <tr>
          {if $priceset || $priceset == 0}
-           <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+           <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
          {else}
-           <td>&nbsp;{ts}NO{/ts} {$taxTerm}</td>
+           <td>&nbsp;{ts}NO{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
            <td>&nbsp;{$value|crmMoney:$currency}</td>
          {/if}
          </tr>
index d1647bdbe20fdb61854e4b865cb214d4ea63d03b..e85feaeec601001990d1484d4f7973f4695b9d49 100644 (file)
@@ -74,9 +74,9 @@
 
 {foreach from=$dataArray item=value key=priceset}
 {if $priceset || $priceset == 0}
-{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
 {else}
-{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}
 {/if}
 {/foreach}
 {/if}