CRM-21478 Using contribution status id instead of label in if statement
authorSamuel Vanhove <samuel@symbiotic.coop>
Fri, 24 Nov 2017 17:07:20 +0000 (12:07 -0500)
committerSamuel Vanhove <samuel@symbiotic.coop>
Fri, 24 Nov 2017 17:07:20 +0000 (12:07 -0500)
templates/CRM/Contribute/Page/UserDashboard.tpl

index eb768428c3c9e49ab85abc258d2532fc4decf81e..01aee8307b04238552a0786690c31dbdb0814e3e 100644 (file)
@@ -65,7 +65,7 @@
                                 <a class="button no-popup nowrap"
                                    href="{crmURL p='civicrm/contribute/invoice' q=$urlParams}">
                                     <i class="crm-i fa-print"></i>
-                                    {if $row.contribution_status != 'Refunded' && $row.contribution_status != 'Cancelled' }
+                                    {if $row.contribution_status_id != 7 && $row.contribution_status_id != 3 }
                                         <span>{ts}Print Invoice{/ts}</span>
                                     {else}
                                         <span>{ts}Print Invoice and Credit Note{/ts}</span>
@@ -74,7 +74,7 @@
                             {/if}
                           </td>
                         {/if}
-                        {if $defaultInvoicePage && $row.contribution_status == 'Pending (Pay Later)'}
+                        {if $defaultInvoicePage && $row.contribution_status_id == 2}
                           <td>
                             {assign var='id' value=$row.contribution_id}
                             {capture assign=payNowLink}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$defaultInvoicePage`&ccid=`$id`"}{/capture}
     {/if}
 </div>
 {crmRegion name="crm-contribute-userdashboard-post"}
-{/crmRegion}
\ No newline at end of file
+{/crmRegion}