Switch view pdf to print if enabled
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 14 Feb 2019 17:45:50 +0000 (12:45 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 14 Feb 2019 17:45:50 +0000 (12:45 -0500)
If the pdf invoices are enabled switch to print pdf.

views/admin/billing/statements.html
views/admin/settings/billing.html

index 6177ba0..a4c3367 100644 (file)
                 <th>Amount</th>
                 <th>Balance</th>
                 <th>Pay Invoice</th>
-                <th>View</th>
+                <th>
+                    {if isset( $settings.invoice_pdf_enabled ) && $settings.invoice_pdf_enabled}
+                        Print
+                    {else}
+                        View
+                    {/if}
+                </th>
             </tr>
         </thead>
         <tbody>
                             {if $transaction.transaction_data.paid}&nbsp;{else}<a href="{$thisUrl}?page={$thisPage}&glm_action=billing&option=makepayment&member={$memberID}">Pay Invoice</a>{/if}
                         {/if}
                         </td>
-                        <td class="glm-shrink"> <a href="{$thisUrl}?page={$thisPage}&glm_action=billing&option=view&member={$memberID}&id={$transaction.type_id}">View</a> </td>
+                        <td class="glm-shrink">
+                            {if isset( $settings.invoice_pdf_enabled ) && $settings.invoice_pdf_enabled}
+                                <a href="{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createPDFInvoice&id={$transaction.type_id}" target="_blank">Print</a>
+                            {else}
+                                <a href="{$thisUrl}?page={$thisPage}&glm_action=billing&option=view&member={$memberID}&id={$transaction.type_id}">View</a>
+                            {/if}
+                        </td>
                     </tr>
                 {* Payments *}
                 {elseif $transaction.type == '20'}
index 64fa14a..d741876 100644 (file)
                             </th>
                             <td>
                                 <input type="checkbox" name="renewal_day_static"{if $billingSettings.fieldData.renewal_day_static.value} checked="checked"{/if}>
-                                All Members renewal same day each year
+                                All Members renewal same day each year (UPTRA)
                             </td>
                         </tr>