From 735eaff9062ed1cef41919bc14d1ef28d19e750f Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 6 Dec 2016 17:37:48 +1300 Subject: [PATCH] CRM-19298 further fix on templates. Upgrade version did not seem to have an if ending in the right place. Also, simplify 2 if statements to one --- .../membership_online_receipt_html.tpl | 10 ++++------ .../membership_online_receipt_text.tpl | 4 +--- .../membership_online_receipt_html.tpl | 6 ++---- .../membership_online_receipt_text.tpl | 4 +--- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_html.tpl index 4777aa4f10..d10ce575fa 100644 --- a/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_html.tpl @@ -91,8 +91,7 @@ {$membership_amount|crmMoney} - {if $amount} - {if ! $is_separate_payment } + {if $amount && !$is_separate_payment} {ts}Contribution Amount{/ts} @@ -101,13 +100,12 @@ {$amount|crmMoney} - {/if} - - {ts}Total{/ts} + + {ts}Total{/ts} - {$amount+$membership_amount|crmMoney} + {$amount+$membership_amount|crmMoney} {/if} diff --git a/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_text.tpl b/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_text.tpl index 08ebc1e13b..aebd6d484e 100644 --- a/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_text.tpl +++ b/CRM/Upgrade/4.7.14.msg_template/message_templates/membership_online_receipt_text.tpl @@ -30,13 +30,11 @@ =========================================================== {if !$useForMember && $membership_amount && $is_quick_config} {ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney} -{if $amount} -{if ! $is_separate_payment } +{if $amount && !$is_separate_payment } {ts}Contribution Amount{/ts}: {$amount|crmMoney} ------------------------------------------- {ts}Total{/ts}: {$amount+$membership_amount|crmMoney} {/if} -{/if} {elseif !$useForMember && $lineItem and $priceSetID & !$is_quick_config} {foreach from=$lineItem item=value key=priceset} --------------------------------------------------------- diff --git a/xml/templates/message_templates/membership_online_receipt_html.tpl b/xml/templates/message_templates/membership_online_receipt_html.tpl index d4ffb4b6fb..2e6136414f 100644 --- a/xml/templates/message_templates/membership_online_receipt_html.tpl +++ b/xml/templates/message_templates/membership_online_receipt_html.tpl @@ -91,8 +91,7 @@ {$membership_amount|crmMoney} - {if $amount} - {if ! $is_separate_payment } + {if $amount && !$is_separate_payment } {ts}Contribution Amount{/ts} @@ -109,8 +108,7 @@ {$amount+$membership_amount|crmMoney} - {/if} - {/if} + {/if} {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config} diff --git a/xml/templates/message_templates/membership_online_receipt_text.tpl b/xml/templates/message_templates/membership_online_receipt_text.tpl index 08ebc1e13b..aebd6d484e 100644 --- a/xml/templates/message_templates/membership_online_receipt_text.tpl +++ b/xml/templates/message_templates/membership_online_receipt_text.tpl @@ -30,13 +30,11 @@ =========================================================== {if !$useForMember && $membership_amount && $is_quick_config} {ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney} -{if $amount} -{if ! $is_separate_payment } +{if $amount && !$is_separate_payment } {ts}Contribution Amount{/ts}: {$amount|crmMoney} ------------------------------------------- {ts}Total{/ts}: {$amount+$membership_amount|crmMoney} {/if} -{/if} {elseif !$useForMember && $lineItem and $priceSetID & !$is_quick_config} {foreach from=$lineItem item=value key=priceset} --------------------------------------------------------- -- 2.25.1