From: Eileen McNaughton Date: Mon, 4 Sep 2023 07:46:17 +0000 (+1200) Subject: dev/3410#3410 Show 0 rather than nothing when paid amount is zero X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6408ea0c5a9b4993f6bc10117d7c8a3630f0d1d1;p=civicrm-core.git dev/3410#3410 Show 0 rather than nothing when paid amount is zero Per https://lab.civicrm.org/dev/core/-/issues/3410 the incorrect value is no longer showing - but it is pretty confusing having the title but not the value when the value is 0 --- diff --git a/xml/templates/message_templates/event_offline_receipt_html.tpl b/xml/templates/message_templates/event_offline_receipt_html.tpl index 90d7655a56..4d44eabedc 100644 --- a/xml/templates/message_templates/event_offline_receipt_html.tpl +++ b/xml/templates/message_templates/event_offline_receipt_html.tpl @@ -269,13 +269,13 @@ {/foreach} {/if} - {if $totalTaxAmount} + {if {contribution.tax_amount|boolean}} {ts}Total Tax Amount{/ts} - {$totalTaxAmount|crmMoney:$currency} + {contribution.tax_amount} {/if} @@ -284,7 +284,7 @@ {ts}Total Paid{/ts} - {if {contribution.paid_amount|boolean}}{contribution.paid_amount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} + {contribution.paid_amount} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} @@ -295,7 +295,7 @@ {ts}Total Amount{/ts} - {if {contribution.total_amount|boolean}}{contribution.total_amount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} + {contribution.total_amount} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} {/if} diff --git a/xml/templates/message_templates/event_offline_receipt_text.tpl b/xml/templates/message_templates/event_offline_receipt_text.tpl index a92de26188..9a7a288e9b 100644 --- a/xml/templates/message_templates/event_offline_receipt_text.tpl +++ b/xml/templates/message_templates/event_offline_receipt_text.tpl @@ -139,14 +139,14 @@ {/foreach} {/if} -{if $totalTaxAmount} -{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency} +{if {contribution.tax_amount|boolean}} +{ts}Total Tax Amount{/ts}: {contribution.tax_amount} {/if} {if {event.is_monetary|boolean}} -{if {contribution.balance_amount|boolean}}{ts}Total Paid{/ts}: {if {contribution.paid_amount|boolean}}{contribution.paid_amount}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} +{if {contribution.balance_amount|boolean}}{ts}Total Paid{/ts}: {contribution.paid_amount} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} {ts}Balance{/ts}: {contribution.balance_amount} -{else}{ts}Total Amount{/ts}: {if {contribution.total_amount|boolean}}{contribution.total_amount}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} +{else}{ts}Total Amount{/ts}: {contribution.total_amount} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if} {/if} {if !empty($pricesetFieldsCount) }