From 5c011cd35ed53d044dc80596ef07784125f57dc3 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Wed, 17 May 2023 15:16:28 +0100 Subject: [PATCH] Fix invoice being sent instead of receipt if contribution 'is_pay_later' is true --- .../message_templates/contribution_online_receipt_subject.tpl | 2 +- .../message_templates/membership_online_receipt_subject.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/templates/message_templates/contribution_online_receipt_subject.tpl b/xml/templates/message_templates/contribution_online_receipt_subject.tpl index 052dce5bd7..43eed64b71 100644 --- a/xml/templates/message_templates/contribution_online_receipt_subject.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_subject.tpl @@ -1 +1 @@ -{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name} +{if '{contribution.contribution_status_id:name}' === 'Pending'}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name} diff --git a/xml/templates/message_templates/membership_online_receipt_subject.tpl b/xml/templates/message_templates/membership_online_receipt_subject.tpl index 052dce5bd7..43eed64b71 100644 --- a/xml/templates/message_templates/membership_online_receipt_subject.tpl +++ b/xml/templates/message_templates/membership_online_receipt_subject.tpl @@ -1 +1 @@ -{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name} +{if '{contribution.contribution_status_id:name}' === 'Pending'}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name} -- 2.25.1