From: Guanhuan Chen Date: Mon, 7 Sep 2015 11:32:11 +0000 (+0100) Subject: Allow credit note to be downloaded on cancellations X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9ece4458896c11e816864405e9c41c637523b27d;p=civicrm-core.git Allow credit note to be downloaded on cancellations --- 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}