Updates for billing invoicing
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 28 Nov 2018 21:54:35 +0000 (16:54 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 28 Nov 2018 21:54:35 +0000 (16:54 -0500)
Working on the invoicing section.
Creating invoices
setting up the payment type and counties filter.
more work on the update import for member accounts for uptravel.

12 files changed:
classes/billingSupport.php
classes/data/dataAccounts.php
models/admin/billing/invoices.php
models/admin/billing/invoicing.php [new file with mode: 0644]
models/admin/management/importAccounts.php
setup/validActions.php
views/admin/billing/bulkAddInvoices.html [deleted file]
views/admin/billing/editAccount.html
views/admin/billing/header.html
views/admin/billing/invoicing.html [new file with mode: 0644]
views/admin/billing/memberBillingSubHeader.html
views/admin/billing/subHeader.html

index 2a44049..920d055 100644 (file)
@@ -682,11 +682,10 @@ class GlmBillingSupport
     {
         // Find all invoices for this account that aren't marked as paid.
         $balance_due = (float)0.00;
-        $results = $this->wpdb->get_results(
-            "SELECT *
-               FROM ",
-            ARRAY_A
-        );
+        $invoices = $this->getUnPaidInvoicesByAccount( $account );
+        foreach ( $invoices as $invoice ) {
+            $balance_due += (float)$invoice['balance'];
+        }
         return $balance_due;
     }
 
index 9603c47..e12270c 100644 (file)
@@ -82,6 +82,15 @@ class GlmDataAccounts extends GlmDataAbstract
      */
     public $postEmployees = false;
 
+    /**
+     * Pull in the name of the payment type.
+     */
+    public $paymentTypes = false;
+    /**
+     * Pull in the balance due for this account.
+     */
+    public $balanceDue = false;
+
     /**
      * Constructor
      *
@@ -144,6 +153,18 @@ class GlmDataAccounts extends GlmDataAbstract
                 'use'        => 'a'
             ),
 
+            'member_name' => array(
+                'field'      => 'ref_dest',
+                'type'       => 'pointer',
+                'p_table'    => GLM_MEMBERS_PLUGIN_DB_PREFIX .  'members',
+                'p_field'    => 'name',
+                'p_orderby'  => 'name',
+                'p_blank'    => false,
+                'required'   => false,
+                'use'        => 'l',
+                'as'         => 'member_name',
+            ),
+
             // Name of red_dest
             'ref_name' => array(
                 'field'    => 'ref_name',
@@ -390,6 +411,23 @@ class GlmDataAccounts extends GlmDataAbstract
             $r['employees'] = $employees;
         }
 
+        if ( $this->paymentTypes ) {
+            $r['payment_type'] = $this->wpdb->get_var(
+                $this->wpdb->prepare(
+                    "SELECT name
+                       FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoice_types
+                      WHERE id = %d",
+                      $r['invoice_type']
+                )
+            );
+        }
+
+        if ( $this->balanceDue ) {
+            include_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH.'/billingSupport.php';
+            $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
+            $r['balance_due'] = $BillingSupport->getBalanceDueByAccount( $r['id'] );
+        }
+
         return $r;
     }
 
index f78f572..2f04706 100644 (file)
@@ -131,6 +131,7 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices
         $filterOverdue      = false;
         $counties           = false;
         $paymentTypes       = false;
+        $invoiceTypes       = false;
 
         // Get any provided option
         if (isset($_REQUEST['option'])) {
@@ -140,7 +141,8 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices
         // Do selected option
         switch ($option) {
         case 'bulkadd':
-            $view = 'bulkAddInvoices';
+            $view   = 'bulkAddInvoices';
+            $wParts = array();
 
             // Check if Counties is enabled and fetch counties
             if ( isset( $this->config['settings']['enable_counties'] ) && $this->config['settings']['enable_counties'] ) {
@@ -157,7 +159,20 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices
 
             // Need to get the accounts
             $Accounts    = new GlmDataAccounts( $this->wpdb, $this->config );
-            $accountList = $Accounts->getSimpleAccountList( '', '', true, 'id', 1, 20 );
+
+            if ( isset( $_REQUEST['invoice_types'] ) ) {
+
+                $invoiceTypes = $_REQUEST['invoice_types'];
+
+                $wParts[] = "T.id IN (
+                    SELECT invoice
+                      FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "line_items
+                     WHERE line_item_type IN (" . implode( ',', $invoiceTypes ) . ") )";
+            }
+
+            $where = implode( ' AND ', $wParts );
+
+            $accountList = $Accounts->getSimpleAccountList( $where, '', true, 'id', 1, 20 );
             $accounts    = $accountList['list'];
 
             break;
diff --git a/models/admin/billing/invoicing.php b/models/admin/billing/invoicing.php
new file mode 100644 (file)
index 0000000..d5aafc6
--- /dev/null
@@ -0,0 +1,265 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Transactions List
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link     http://dev.gaslightmedia.com/
+ */
+
+// Load Contacts data class
+require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/billingSupport.php';
+
+class GlmMembersAdmin_billing_invoicing //extends GlmDataAccounts
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * Plugin Configuration Data
+     *
+     * @var $config
+     * @access public
+     */
+    public $config;
+    /**
+     * Transactions ID
+     *
+     * @var $account_id
+     * @access public
+     */
+    public $account_id = false;
+
+    /**
+     * Constructor
+     *
+     * This constructor performs the work for this model. This model returns
+     * an array containing the following.
+     *
+     * 'status'
+     *
+     * True if successful and false if there was a fatal failure.
+     *
+     * 'view'
+     *
+     * A suggested view name that the controller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     * @wpdb object WordPress database object
+     *
+     * @return array Array containing status, suggested view, and any data
+     */
+    public function __construct ( $wpdb, $config )
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        /*
+         * Run constructor for the Contacts data class
+         *
+         * Note, the third parameter is a flag that indicates to the Contacts
+         * data class that it should flag a group of fields as 'view_only'.
+         */
+        // parent::__construct( false, false, true );
+
+    }
+
+    public function modelAction($actionData = false)
+    {
+
+        $haveAccounts  = false;
+        $option        = 'list';
+        $view          = 'invoicing';
+        $wParts        = array( 'true' );
+        $paymentTypes  = false;
+        $counties      = false;
+        $accounts      = false;
+        $paging        = true;
+        $prevStart     = false;
+        $nextStart     = false;
+        $start         = 1;
+        $limit         = 20;        // Set to the number of listings per page
+        $numbDisplayed = false;
+        $lastDisplayed = false;
+        $totalAccounts = false;
+
+        // Get any provided option
+        if ( isset( $_REQUEST['option'] ) ) {
+            $option = $_REQUEST['option'];
+        }
+
+        $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
+        $Accounts       = new GlmDataAccounts( $this->wpdb, $this->config );
+
+        echo '<pre>$_REQUEST: ' . print_r( $_REQUEST, true ) . '</pre>';
+
+        if ( isset( $_REQUEST['invoice_types'] ) ) {
+
+            $invoiceTypes = $_REQUEST['invoice_types'];
+            $wParts[] = " T.invoice_type IN (" . implode(',', $invoiceTypes) . ") ";
+
+        }
+
+        if ( isset( $_REQUEST['counties'] ) ) {
+
+            // $wParts[] = "T.";
+
+        }
+
+        // $where used in all places.
+        $where = implode( ' AND ', $wParts );
+
+        if ( isset( $_REQUEST['submitType'] ) ) {
+
+            $option2 = filter_var( $_REQUEST['submitType'], FILTER_SANITIZE_STRING );
+
+            switch( $option2 ) {
+            case 'Create Invoices':
+                $accounts = $Accounts->getSimpleAccountList( $where );
+                echo '<pre>$accounts: ' . print_r( $accounts, true ) . '</pre>';
+                foreach ( $accounts as $account ) {
+                    // Get the invoice type
+                    $invoiceType = $BillingSupport->getInvoiceTypeById( $account['invoice_type'] );
+
+                    // Create the invoice for this member account
+                    $BillingSupport->createMemberInvoiceWithEmployees(
+                        array(
+                            'account_id'     => $account['id'],
+                            'renew_type_id'  => $account['invoice_type'],
+                            'amount'         => $invoiceType['amount'],
+                            'due_date'       => date( 'Y-m-d' ),
+                            'member_invoice' => $account['invoice_type'],
+                            'employee_data'  => array(),
+                            'employees'      => array(),
+                        )
+                    );
+                }
+
+                break;
+            case 'Print Invoices':
+                break;
+            case 'Send Invoices':
+                break;
+            default:
+                break;
+            }
+
+        }
+
+        // Do selected option
+        switch ($option) {
+
+        case 'list':
+        default:
+            $view = 'invoicing';
+
+            // Check if Counties is enabled and fetch counties
+            if ( isset( $this->config['settings']['enable_counties'] ) && $this->config['settings']['enable_counties'] ) {
+                // Grab counties
+                $counties = $this->wpdb->get_results(
+                    "SELECT *
+                       FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "counties
+                    ORDER BY name",
+                    ARRAY_A
+                );
+            }
+
+            $paymentTypes = $BillingSupport->getAllInvoiceTypes();
+
+
+            if (isset($_REQUEST['pageSelect'])) {
+                // If request is for Next
+                if ($_REQUEST['pageSelect'][0] == 'N') {
+                    $newStart = $_REQUEST['nextStart'] - 0;
+
+                // Otherwise it must be Previous
+                } else {
+                    $newStart = $_REQUEST['prevStart'] - 0;
+                }
+
+                if ($newStart > 0) {
+                    $start = $newStart;
+                }
+            }
+            $orderBy                = 'member_name';
+            $Accounts->paymentTypes = true;
+            $Accounts->balanceDue   = true;
+            $accountsResult         = $Accounts->getList( $where, $orderBy, true, 'id', $start, $limit );
+            $totalAccounts          = $Accounts->getStats( $where );
+            $Accounts->paymentTypes = false;
+            $Accounts->balanceDue   = false;
+            // Get paging results
+            $numbDisplayed = $accountsResult['returned'];
+            $lastDisplayed = $accountsResult['last'];
+            if ( $start == 1 ) {
+                $prevStart = false;
+            } else {
+                $prevStart = $start - $limit;
+                if ( $start < 1 ) {
+                    $start = 1;
+                }
+            }
+            if ( $accountsResult['returned'] == $limit ) {
+                $nextStart = $start + $limit;
+            }
+
+            // since we're doing paging, we have to break out just the accounts data
+            $accounts = $accountsResult['list'];
+            // echo '<pre>$accounts: ' . print_r( $accounts, true ) . '</pre>';
+            if ( count( $accounts ) > 0 ) {
+                $haveAccounts = true;
+            }
+
+            break;
+
+        }
+
+
+        $templateData = array(
+            'option'        => $option,
+            'paymentTypes'  => $paymentTypes,
+            'counties'      => $counties,
+            'accounts'      => $accounts,
+            'paging'        => $paging,
+            'prevStart'     => $prevStart,
+            'nextStart'     => $nextStart,
+            'start'         => $start = 1,
+            'limit'         => $limit,
+            'haveAccounts'  => $haveAccounts,
+            'numbDisplayed' => $numbDisplayed,
+            'lastDisplayed' => $lastDisplayed,
+            'totalAccounts' => $totalAccounts,
+        );
+
+        // Return status, any suggested view, and any data to controller
+        return array(
+            'status'        => true,
+            'modelRedirect' => false,
+            'view'          => "admin/billing/$view.html",
+            'data'          => $templateData
+        );
+
+    }
+
+}
index d260f02..c924574 100644 (file)
@@ -143,7 +143,9 @@ $importResults .= 'Total Members: ' . $totalMembers . "<br>";
 $sql = "
 SELECT M.member_id,M.billing_contact,M.account_number,
        PT.name as payment_type,M.process_email as email, M.member_name,
-       MA.email_invoice, MA.usmail_invoice, MA.fax_invoice
+       MA.email_invoice, MA.usmail_invoice, MA.fax_invoice,
+       M.mailing_address,M.mailing_city_id,M.mailing_state_id,M.mailing_zip,
+       M.street,M.city_id,M.state_id,M.zip
   FROM members.member M
 LEFT OUTER JOIN members.member_account MA ON ( MA.member_id = M.member_id )
 LEFT OUTER JOIN members.payment_types PT ON ( MA.payment_type = PT.id )
@@ -169,6 +171,18 @@ if ( $start === 0 ) {
     // $this->wpdb->query( "DELETE FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "transactions" );
 }
 
+$getState = $dbh->prepare(
+    "SELECT state_abb
+       FROM members.state
+      WHERE state_id = :id"
+);
+
+$getCity = $dbh->prepare(
+    "SELECT city_name
+       FROM members.city
+      WHERE city_id = :id"
+);
+
 foreach ( $members as $member ) {
 
     $importResults .= '<pre>$member: ' . print_r( $member, true ) . '</pre>';
@@ -188,18 +202,55 @@ foreach ( $members as $member ) {
 
         $paymentTypeId = getPaymentTypeId( $this->wpdb, $member['payment_type'] );
 
-        $refName = ( $member['billing_contact'] ) ? $member['billing_contact'] : $member['member_name'];
+        //$refName = ( $member['billing_contact'] ) ? $member['billing_contact'] : $member['member_name'];
+        $refName = $member['member_name'];
+        $city = $state = '';
+
+        if ( $member['mailing_address'] ) {
+            $addr1 = $member['mailing_address'];
+            if ( $member['mailing_city_id'] ) {
+                $getCity->bindParam( ':id', $member['mailing_city_id'] );
+                $getCity->execute();
+                $city  = $getCity->fetchColumn();
+            }
+            if ( $member['mailing_state_id'] ) {
+                $getState->bindParam( ':id', $member['mailing_state_id'] );
+                $getState->execute();
+                $state  = $getState->fetchColumn();
+            }
+            $zip   = $member['mailing_zip'];
+        } else {
+            $addr1 = $member['street'];
+            $city  = $member['city'];
+            $state = $member['state'];
+            if ( $member['city_id'] ) {
+                $getCity->bindParam( ':id', $member['city_id'] );
+                $getCity->execute();
+                $city  = $getCity->fetchColumn();
+            }
+            if ( $member['state_id'] ) {
+                $getState->bindParam( ':id', $member['state_id'] );
+                $getState->execute();
+                $state  = $getState->fetchColumn();
+            }
+            $zip   = $member['zip'];
+        }
 
         $accountData = array(
-            'ref_dest'       => $newMemberId,
-            'ref_name'       => $refName,
-            'invoice_type'   => $paymentTypeId,
-            'email'          => $member['email'],
-            'account_number' => $member['account_number'],
-            'renewal_date'   => '2018-07-01',
-            'email_invoice'  => $member['email_invoice'],
-            'usmail_invoice' => $member['usmail_invoice'],
-            'fax_invoice'    => $member['fax_invoice'],
+            'ref_dest'        => $newMemberId,
+            'ref_name'        => $refName,
+            'invoice_type'    => $paymentTypeId,
+            'email'           => $member['email'],
+            'account_number'  => $member['account_number'],
+            'renewal_date'    => '2018-07-01',
+            'email_invoice'   => $member['email_invoice'],
+            'usmail_invoice'  => $member['usmail_invoice'],
+            'fax_invoice'     => $member['fax_invoice'],
+            'billing_company' => $member['member_name'],
+            'billing_addr1'   => $addr1,
+            'billing_city'    => $city,
+            'billing_state'   => $state,
+            'billing_zip'     => $zip,
         );
         $accountDataFormat = array(
             '%d', // ref_dest
@@ -211,6 +262,11 @@ foreach ( $members as $member ) {
             '%d', // email_invoice
             '%d', // usmail_invoice
             '%d', // fax_invoice
+            '%s', // billing_company
+            '%s', // billing_addr1
+            '%s', // billing_city
+            '%s', // billing_state
+            '%s', // billing_zip
         );
 
         $importResults .= '<pre>$accountData: ' . print_r( $accountData, true ) . '</pre>';
index 2c0e1ae..e721194 100644 (file)
@@ -80,13 +80,14 @@ $glmMembersBillingAddOnValidActions = array(
             'notificationTypes' => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
         ),
         'billing' => array(
-            'index'    => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
-            'list'     => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
-            'invoices' => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
-            'payments' => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
-            'accounts' => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
-            'logs'     => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
-            'contact'  => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'index'     => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'list'      => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'invoices'  => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'payments'  => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'accounts'  => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'invoicing' => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'logs'      => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
+            'contact'   => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
         ),
         'member' => array(
             'billing' => GLM_MEMBERS_BILLING_PLUGIN_SLUG,
diff --git a/views/admin/billing/bulkAddInvoices.html b/views/admin/billing/bulkAddInvoices.html
deleted file mode 100644 (file)
index ba159b4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-{include file='admin/billing/header.html'}
-
-{include file='admin/billing/subHeader.html'}
-
-<h2>Bulk Create Invoices</h2>
-
-{if $paymentTypes}
-
-    <label>Payment Types:</label>
-
-    <select multiple size="10">
-        {foreach $paymentTypes as $paymentType}
-        <option value="{$paymentType.id}">{$paymentType.name}</option>
-        {/foreach}
-    </select>
-
-{/if}
-
-{if $counties}
-
-    <label>Counties:</label>
-
-    <select multiple size="10">
-        {foreach $counties as $county}
-        <option value="{$county.id}">{$county.name}</option>
-        {/foreach}
-    </select>
-
-{/if}
-
-<button>Filter</button>
-
-<div id="account-list">
-
-    {foreach $accounts as $t}
-    <div>{$t.ref_name}</div>
-    {/foreach}
-
-</div>
-
-{include file='admin/footer.html'}
index 4b106fb..311fd81 100644 (file)
@@ -69,7 +69,7 @@
 
         {/if}
 
-        {if !$settings.member_types_enabled}
+        {if $settings.invoice_methods_enabled}
 
             <div class="">
                 <div class="glm-billing-label">Invoice Delivery Methods</div>
index ff6dc65..f4ff6d7 100644 (file)
@@ -5,6 +5,7 @@
         <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices" class="nav-tab{if $thisAction==invoices} nav-tab-active{/if}">Invoices</a>
         <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=payments" class="nav-tab{if $thisAction==payments} nav-tab-active{/if}">Payments</a>
         <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=accounts" class="nav-tab{if $thisAction==accounts} nav-tab-active{/if}">Accounts</a>
+        <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoicing" class="nav-tab{if $thisAction==invoicing} nav-tab-active{/if}">Invoicing</a>
         <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=logs" class="nav-tab{if $thisAction==logs} nav-tab-active{/if}">Logs</a>
     </h2>
     <div id="glm-admin-content-container">
diff --git a/views/admin/billing/invoicing.html b/views/admin/billing/invoicing.html
new file mode 100644 (file)
index 0000000..4ad2e46
--- /dev/null
@@ -0,0 +1,85 @@
+{include file='admin/billing/header.html'}
+
+{* include file='admin/billing/invoicingSubHeader.html' *}
+
+<h2>Invoicing</h2>
+
+<form action="{$thisUrl}?page={$thisPage}" method="post">
+
+    <input type="hidden" name="glm_action" value="invoicing">
+    <input type="hidden" name="option" value="list">
+    <input type="hidden" name="prevStart" value="{$prevStart}">
+    <input type="hidden" name="nextStart" value="{$nextStart}">
+    <input type="hidden" name="limit" value="{$limit}">
+
+    <div class="glm-admin-table-inner">
+        {if $paymentTypes}
+
+            <label>Payment Types:</label>
+
+            <select multiple size="10" name="invoice_types[]">
+                {foreach $paymentTypes as $paymentType}
+                    <option value="{$paymentType.id}"{if isset($smarty.request.invoice_types) && in_array( $paymentType.id, $smarty.request.invoice_types )} selected{/if}>{$paymentType.name}</option>
+                {/foreach}
+            </select>
+
+        {/if}
+
+        {if $counties}
+
+            <label>Counties:</label>
+
+            <select multiple size="10" name="counties[]">
+                {foreach $counties as $county}
+                    <option value="{$county.id}"{if isset($smarty.request.counties) && in_array( $county.id, $smarty.request.counties )} selected{/if}>{$county.name}</option>
+                {/foreach}
+            </select>
+
+        {/if}
+
+        <input type="submit" value="Filter">
+
+        <input type="submit" name="submitType" value="Create Invoices">
+
+    </div>
+
+    <p>Total found: {$totalAccounts}</p>
+
+    {* Paging *}
+    {if $paging}
+        <input type="Submit" name="pageSelect" value="Previous {$limit} Accounts" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+        <input type="Submit" name="pageSelect" value="Next {$limit} Accounts" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+    {/if}
+
+    <br clear="all">
+
+    <div id="account-list">
+        <table class="wp-list-table widefat fixed posts glm-admin-table">
+            <thead>
+                <tr>
+                    <th> Member Name </th>
+                    <th> Account Number </th>
+                    <th> Payment Type </th>
+                    <th> Balance Due </th>
+                </tr>
+            </thead>
+            {foreach $accounts as $t}
+                <tr>
+                    <td> {$t.member_name} </td>
+                    <td> {$t.account_number} </td>
+                    <td> {$t.payment_type} </td>
+                    <td> {$t.balance_due|string_format:"%.2f"} </td>
+                </tr>
+            {/foreach}
+        </table>
+    </div>
+
+    {* Paging *}
+    {if $paging}
+        <input type="submit" name="pageSelect" value="Previous {$limit} Accounts" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+        <input type="submit" name="pageSelect" value="Next {$limit} Accounts" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+    {/if}
+
+</form>
+
+{include file='admin/footer.html'}
index 01fb837..33439eb 100644 (file)
@@ -1,13 +1,15 @@
 <div class="glm-grid-container">
     <div class="glm-grid-item">
         <div><strong>Member Name:</strong> {$memberData.name}</div>
-        <div>{$memberData.member_type_short}</div>
+        {if $settings.member_types_enabled}
+            <div>{$memberData.member_type_short}</div>
+        {/if}
         {if $account_data}
             {if $settings.member_types_enabled}
                 <div><strong>Renewal date:</strong> {$account_data.renewal_date|strtotime|date_format}</div>
                 <div><strong>Membership Status:</strong> {$account_status}</div>
             {else}
-                Uptra stuff here
+            {* Uptra stuff here *}
             {/if}
         {/if}
     </div>
index 5f5266a..f7fcaf2 100644 (file)
@@ -3,6 +3,4 @@
         class="nav-tab{if $option == 'list'} nav-tab-active{/if}">Search Invoices</a>
     <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=add"
         class="nav-tab{if $option == 'add' || $option == 'edit'} nav-tab-active{/if}">Create Invoice</a>
-    <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=bulkadd"
-        class="nav-tab{if $option == 'bulkadd'} nav-tab-active{/if}">Create Bulk Invoices</a>
 </h2>