From 9ece4458896c11e816864405e9c41c637523b27d Mon Sep 17 00:00:00 2001 From: Guanhuan Chen Date: Mon, 7 Sep 2015 12:32:11 +0100 Subject: [PATCH] Allow credit note to be downloaded on cancellations --- .../CRM/Contribute/Form/ContributionView.tpl | 4 +-- .../CRM/Contribute/Page/UserDashboard.tpl | 32 ++++++++----------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/templates/CRM/Contribute/Form/ContributionView.tpl b/templates/CRM/Contribute/Form/ContributionView.tpl index 87c395c574..2e6fdade3e 100644 --- a/templates/CRM/Contribute/Form/ContributionView.tpl +++ b/templates/CRM/Contribute/Form/ContributionView.tpl @@ -47,11 +47,11 @@ {include file="CRM/common/formButtons.tpl" location="top"} {assign var='pdfUrlParams' value="reset=1&id=$id&cid=$contact_id"} {assign var='emailUrlParams' value="reset=1&id=$id&cid=$contact_id&select=email"} - {if $invoicing && $cancelledStatus} + {if $invoicing}
- {if $contribution_status != 'Refunded'} + {if $contribution_status != 'Refunded' && $contribution_status != 'Cancelled' } {ts}Print Invoice{/ts}
{else} {ts}Print Invoice and Credit Note{/ts} diff --git a/templates/CRM/Contribute/Page/UserDashboard.tpl b/templates/CRM/Contribute/Page/UserDashboard.tpl index b24b44e930..5189bcee0e 100644 --- a/templates/CRM/Contribute/Page/UserDashboard.tpl +++ b/templates/CRM/Contribute/Page/UserDashboard.tpl @@ -52,26 +52,22 @@ {$row.receipt_date|truncate:10:''|crmDate} {$row.contribution_status} {if $invoicing && $invoices} - {if $row.contribution_status_name != 'Cancelled'} - - {assign var='id' value=$row.contribution_id} - {assign var='contact_id' value=$row.contact_id} - {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id"} - {if call_user_func(array('CRM_Core_Permission','check'), 'view my invoices') OR call_user_func(array('CRM_Core_Permission','check'), 'access CiviContribute')} - - - {if $row.contribution_status != 'Refunded'} - {ts}Print Invoice{/ts} - {else} - {ts}Print Invoice and Credit Note{/ts} - {/if} - + + {assign var='id' value=$row.contribution_id} + {assign var='contact_id' value=$row.contact_id} + {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id"} + {if call_user_func(array('CRM_Core_Permission','check'), 'view my invoices') OR call_user_func(array('CRM_Core_Permission','check'), 'access CiviContribute')} + + + {if $row.contribution_status != 'Refunded' && $row.contribution_status != 'Cancelled' } + {ts}Print Invoice{/ts} + {else} + {ts}Print Invoice and Credit Note{/ts} {/if} - - {else} - + {/if} + {/if} {/foreach} -- 2.25.1