Allow credit note to be downloaded on cancellations
authorGuanhuan Chen <oooomic@gmail.com>
Mon, 7 Sep 2015 11:32:11 +0000 (12:32 +0100)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 9 Sep 2015 14:52:28 +0000 (20:22 +0530)
templates/CRM/Contribute/Form/ContributionView.tpl
templates/CRM/Contribute/Page/UserDashboard.tpl

index 87c395c574eff8dc436e3f0146496ab1c3662109..2e6fdade3e14b9f7d9127cd64283c82b14e21476 100644 (file)
     {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}
       <div class="css_right">
         <a class="button no-popup" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
           <div class="icon ui-icon-print"></div>
-        {if $contribution_status != 'Refunded'}
+        {if $contribution_status != 'Refunded' && $contribution_status != 'Cancelled' }
           {ts}Print Invoice{/ts}</a>
         {else}
           {ts}Print Invoice and Credit Note{/ts}</a>
index b24b44e9300009966799c969b56de88a316506b5..5189bcee0e9514e2f32881eac77045dead89b349 100644 (file)
                         <td>{$row.receipt_date|truncate:10:''|crmDate}</td>
                         <td>{$row.contribution_status}</td>
                         {if $invoicing && $invoices}
-                            {if $row.contribution_status_name != 'Cancelled'}
-                                <td>
-                                    {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')}
-                                        <a class="button no-popup "
-                                           href="{crmURL p='civicrm/contribute/invoice' q=$urlParams}">
-                                            <span class="icon ui-icon-print"></span>
-                                            {if $row.contribution_status != 'Refunded'}
-                                                <span>{ts}Print Invoice{/ts}</span>
-                                            {else}
-                                                <span>{ts}Print Invoice and Credit Note{/ts}</span>
-                                            {/if}
-                                        </a>
+                          <td>
+                            {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')}
+                                <a class="button no-popup "
+                                   href="{crmURL p='civicrm/contribute/invoice' q=$urlParams}">
+                                    <span class="icon ui-icon-print"></span>
+                                    {if $row.contribution_status != 'Refunded' && $row.contribution_status != 'Cancelled' }
+                                        <span>{ts}Print Invoice{/ts}</span>
+                                    {else}
+                                        <span>{ts}Print Invoice and Credit Note{/ts}</span>
                                     {/if}
-                                </td>
-                            {else}
-                                <td></td>
+                                </a>
                             {/if}
+                          </td>
                         {/if}
                     </tr>
                 {/foreach}