+{* Accounts *}
+
+{* Header *}
{include file='admin/billing/header.html'}
-<div class="callout grid-container">
+{* Grid Start *}
+{$ui = [
+ 'nowrap' => false,
+ 'backgroundColor' => '',
+ 'sectionColor' => ''
+]}
+{include file='ui/f6/grid-start.html'}
- <h3 class="subheader">Accounts</h3>
+<h3 class="subheader">Accounts</h3>
- <div id="exportAccountsButton" class="button secondary">Accounts Export</div>
+<div id="exportAccountsButton" class="button secondary">Accounts Export</div>
- {* Search Form *}
- {include file='admin/billing/accountSearchForm.html'}
+{* Search Form *}
+{include file='admin/billing/accountSearchForm.html'}
- <p>Total found: <span class="label">{$totalAccounts}</span></p>
+<p>Total found: <span class="label">{$totalAccounts}</span></p>
- {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}
+{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">
+<br clear="all">
- <table class="stack glm-admin-table-inner">
- <thead>
- <tr>
- <th style="width:50px;">ID</th>
- <th>Member Name</th>
- {if $settings.allow_employees}
- <th>Boss/Employees</th>
- {/if}
- <th>Billing Email</th>
- <th>Anniversary Date</th>
- <th>Renewal Date</th>
- </tr>
- </thead>
- <tbody>
- {if $haveAccounts}
- {foreach $accounts as $t}
- <tr class="glm-account-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
- <td> {$t.id} </td>
- <td> <b id="account-ref-dest-{$t.id}">{$t.ref_name}</b> </td>
- {if $settings.allow_employees}
- <td> {if $t.boss.value}Yes{/if} </td>
+<table class="stack glm-admin-table-inner">
+ <thead>
+ <tr>
+ <th style="width:50px;">ID</th>
+ <th>Member Name</th>
+ {if $settings.allow_employees}
+ <th>Boss/Employees</th>
+ {/if}
+ <th>Billing Email</th>
+ <th>Anniversary Date</th>
+ <th>Renewal Date</th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $haveAccounts}
+ {foreach $accounts as $t}
+ <tr class="glm-account-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
+ <td> {$t.id} </td>
+ <td> <b id="account-ref-dest-{$t.id}">{$t.ref_name}</b> </td>
+ {if $settings.allow_employees}
+ <td> {if $t.boss.value}Yes{/if} </td>
+ {/if}
+ <td> {$t.email} </td>
+ <td> {$t.anniversary_date.date} </td>
+ <td> {$t.renewal_date.date} </td>
+ </tr>
+ <tr id="account-container-{$t.id}" class="hide-for-large glm-account-links {if $t@iteration is div by 2} alternate{/if}">
+ <td colspan="{if $settings.allow_employees}6{else}5{/if}">
+ <span class="account-dashboard-link">
+ <a title="Opens in a new window" class="account-member-dashboard" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&member={$t.ref_dest}" target="_blank">
+ Member Dashboard
+ </a> |
+ </span>
+ <span class="account-dashboard-link">
+ <a class="account-member-statements" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}">View Statements</a> |
+ </span>
+ <span class="account-dashboard-link">
+ <a class="account-billing" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=account&member={$t.ref_dest}" data-member="{$t.ref_dest}">Billing Info</a>
+ </span>
+ {if $t.boss.value}
+ <span class="account-dashboard-link">
+ | <a class="account-employees" data-id="{$t.id}" href="#">View Employees</a>
+ </span>
{/if}
- <td> {$t.email} </td>
- <td> {$t.anniversary_date.date} </td>
- <td> {$t.renewal_date.date} </td>
- </tr>
- <tr id="account-container-{$t.id}" class="hide-for-large glm-account-links {if $t@iteration is div by 2} alternate{/if}">
- <td colspan="{if $settings.allow_employees}6{else}5{/if}">
- <span class="account-dashboard-link">
- <a title="Opens in a new window" class="account-member-dashboard" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&member={$t.ref_dest}" target="_blank">
- Member Dashboard
- </a> |
- </span>
- <span class="account-dashboard-link">
- <a class="account-member-statements" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}">View Statements</a> |
- </span>
- <span class="account-dashboard-link">
- <a class="account-billing" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=account&member={$t.ref_dest}" data-member="{$t.ref_dest}">Billing Info</a>
- </span>
- {if $t.boss.value}
- <span class="account-dashboard-link">
- | <a class="account-employees" data-id="{$t.id}" href="#">View Employees</a>
- </span>
- {/if}
+ </td>
+ </tr>
+ {if $t.boss.value}
+ <tr id="account-employees-{$t.id}" class="hide-for-large {if $t@iteration is div by 2} alternate{/if}" style="background-color: #fff;">
+ <td colspan="6">
+ <div class="glm-row" style="margin-bottom: 0px !important; margin-top: .5rem;">
+ {foreach $t.employees as $emp}
+ <div class="glm-columns glm-medium-2">{$emp.ref_name}</div>
+ {/foreach}
+ </div>
+ <div class="glm-row">
+ <div class="glm-columns glm-small-7">
+ <button class="glm-employee-cancel button button-secondary" data-id="{$t.id}">Cancel</button>
+ </div>
+ </div>
</td>
</tr>
- {if $t.boss.value}
- <tr id="account-employees-{$t.id}" class="hide-for-large {if $t@iteration is div by 2} alternate{/if}" style="background-color: #fff;">
- <td colspan="6">
- <div class="glm-row" style="margin-bottom: 0px !important; margin-top: .5rem;">
- {foreach $t.employees as $emp}
- <div class="glm-columns glm-medium-2">{$emp.ref_name}</div>
- {/foreach}
- </div>
- <div class="glm-row">
- <div class="glm-columns glm-small-7">
- <button class="glm-employee-cancel button button-secondary" data-id="{$t.id}">Cancel</button>
- </div>
- </div>
- </td>
- </tr>
- {/if}
- {/foreach}
- {else}
- <tr class="alternate"><td colspan="2">(no Invoice Types listed)</td></tr>
- {/if}
- </tbody>
- </table>
+ {/if}
+ {/foreach}
+ {else}
+ <tr class="alternate"><td colspan="2">(no Invoice Types listed)</td></tr>
+ {/if}
+ </tbody>
+</table>
+{* 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}
- {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 End *}
+{include file='ui/f6/form-end.html'}
- {* Form End *}
- {include file='ui/f6/form-end.html'}
+{* export Modals *}
+{include file='admin/billing/exportBillingModal.html'}
- {include file='admin/billing/exportBillingModal.html'}
- {include file='admin/billing/accountReveals.html'}
+{* Account Reveals *}
+{include file='admin/billing/accountReveals.html'}
-</div>
+{* Grid End *}
+{include file='ui/f6/grid-end.html'}
<script>
</script>
-
+{* Footer *}
{include file='admin/billing/footer.html'}
+{* Edit Invoice Type *}
+
+{* Header *}
{include file='admin/billing/header.html'}
-{* <div class="callout grid-container"> *}
+{* Grid Start *}
{$ui = [
'nowrap' => false,
'backgroundColor' => '',
</fieldset>
</div>
+
+{* Form Submit *}
{if isset( $data.fieldData.id )}
{$label = 'Update Invoice Type'}
{else}
<a class="button secondary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoiceTypes">Cancel</a>
+{* Error Callout *}
{include file='ui/f6/errorCallout.html'}
-
+{* Form End *}
{include file='ui/f6/form-end.html'}
+{* Grid End *}
{include file='ui/f6/grid-end.html'}
-{* </div> *}
<script>
jQuery(document).ready(function($){
});
</script>
+{* Footer *}
{include file='admin/billing/footer.html'}
+{* Edit Notification Type *}
<style>
.merge-tags table caption {
font-weight: bold;
}
</style>
+{* Header *}
{include file='admin/billing/header.html'}
{$ui = [
]}
{include file='ui/f6/grid-start.html'}
-{* <div class="callout grid-container"> *}
-
{* Set $data to $notification *}
{* This is for using the UI elements *}
{$data = $notification}
]}
{include file="ui/f6/callout.html"}
-<form id="billing-notification-form" action="{$thisUrl}?page={$thisPage}&glm_action=notifications" method="post" data-abide novalidate>
- {if $notification_id}
- <input type="hidden" name="option" value="update">
- <input type="hidden" name="id" value="{$notification_id}">
- {else}
- <input type="hidden" name="option" value="insert">
- {/if}
-
- {include file='ui/f6/errorCallout.html'}
-
- <div class="grid-container">
- <div class="grid-x grid-margin-x">
-
- <fieldset class="fieldset cell small-12 medium-6">
- <legend>Notification</legend>
-
- {* Name *}
- {$ui = [
- 'value' => $data.fieldData.name,
- 'field' => 'name',
- 'label' => 'Name',
- 'required' => $data.fieldRequired.name,
- 'errorText' => 'Name is Required',
- 'dataError' => $data.fieldFail.name
- ]}
- {include file='ui/f6/text.html'}
-
- <div class="grid-x grid-margin-x">
- <div class="cell small-12">
- <span class="label">Send Notification based on</span>
- </div>
+{* Form Start *}
+{$ui = [
+ 'id' => 'billing-notification-form',
+ 'action' => "{$thisUrl}?page={$thisPage}&glm_action=notifications",
+ 'method' => 'post',
+ 'file' => false
+]}
+{include file="ui/f6/form-start.html"}
+
+{if $notification_id}
+ <input type="hidden" name="option" value="update">
+ <input type="hidden" name="id" value="{$notification_id}">
+{else}
+ <input type="hidden" name="option" value="insert">
+{/if}
+
+{* Error Callout *}
+{include file='ui/f6/errorCallout.html'}
+
+<div class="grid-container">
+ <div class="grid-x grid-margin-x">
+
+ <fieldset class="fieldset cell small-12 medium-6">
+ <legend>Notification</legend>
+
+ {* Name *}
+ {$ui = [
+ 'value' => $data.fieldData.name,
+ 'field' => 'name',
+ 'label' => 'Name',
+ 'required' => $data.fieldRequired.name,
+ 'errorText' => 'Name is Required',
+ 'dataError' => $data.fieldFail.name
+ ]}
+ {include file='ui/f6/text.html'}
+
+ <div class="grid-x grid-margin-x">
+ <div class="cell small-12">
+ <span class="label">Send Notification based on</span>
</div>
-
- <div class="grid-x grid-margin-x">
- <div class="cell small-12">
- <div class="grid-x grid-margin-x">
- <div class="cell small-12 medium-shrink">
- <label>Renewal Date</label>
- <div class="switch">
- <input class="switch-input" type="radio" id="send_by1" name="send_by" value="date" required{if $notification.fieldData.send_by_date.value} checked{/if}>
- <label class="switch-paddle" for="send_by1"><span class="show-for-sr">Date</span></label>
- </div>
- </div>
- <div class="cell small-12 medium-auto">
- {* Number *}
- {$ui = [
- 'value' => $data.fieldData.send_date_number,
- 'field' => 'send_date_number',
- 'label' => 'Number',
- 'pattern' => 'number',
- 'required' => $data.fieldRequired.send_date_number,
- 'errorText' => 'Number is Required to be numeric',
- 'dataError' => $data.fieldFail.send_date_number
- ]}
- {include file='ui/f6/text.html'}
- </div>
- <div class="cell small-12 medium-auto">
- {* Period *}
- {$ui = [
- 'value' => $data.fieldData.send_date_period,
- 'field' => 'send_date_period',
- 'label' => 'Period',
- 'list' => $send_date_period,
- 'l_blank' => false,
- 'required' => $data.fieldRequired.send_date_period,
- 'errorText' => 'Period is Required',
- 'dataError' => $data.fieldFail.send_date_period
- ]}
- {include file='ui/f6/select.html'}
- </div>
- <div class="cell small-12 medium-auto">
- {* When *}
- {$ui = [
- 'value' => $data.fieldData.send_date_when,
- 'field' => 'send_date_when',
- 'label' => 'When',
- 'list' => $send_date_when,
- 'l_blank' => false,
- 'required' => $data.fieldRequired.send_date_when,
- 'errorText' => 'When is Required',
- 'dataError' => $data.fieldFail.send_date_when
- ]}
- {include file='ui/f6/select.html'}
+ </div>
+
+ <div class="grid-x grid-margin-x">
+ <div class="cell small-12">
+ <div class="grid-x grid-margin-x">
+ <div class="cell small-12 medium-shrink">
+ <label>Renewal Date</label>
+ <div class="switch">
+ <input class="switch-input" type="radio" id="send_by1" name="send_by" value="date" required{if $notification.fieldData.send_by_date.value} checked{/if}>
+ <label class="switch-paddle" for="send_by1"><span class="show-for-sr">Date</span></label>
</div>
</div>
+ <div class="cell small-12 medium-auto">
+ {* Number *}
+ {$ui = [
+ 'value' => $data.fieldData.send_date_number,
+ 'field' => 'send_date_number',
+ 'label' => 'Number',
+ 'pattern' => 'number',
+ 'required' => $data.fieldRequired.send_date_number,
+ 'errorText' => 'Number is Required to be numeric',
+ 'dataError' => $data.fieldFail.send_date_number
+ ]}
+ {include file='ui/f6/text.html'}
+ </div>
+ <div class="cell small-12 medium-auto">
+ {* Period *}
+ {$ui = [
+ 'value' => $data.fieldData.send_date_period,
+ 'field' => 'send_date_period',
+ 'label' => 'Period',
+ 'list' => $send_date_period,
+ 'l_blank' => false,
+ 'required' => $data.fieldRequired.send_date_period,
+ 'errorText' => 'Period is Required',
+ 'dataError' => $data.fieldFail.send_date_period
+ ]}
+ {include file='ui/f6/select.html'}
+ </div>
+ <div class="cell small-12 medium-auto">
+ {* When *}
+ {$ui = [
+ 'value' => $data.fieldData.send_date_when,
+ 'field' => 'send_date_when',
+ 'label' => 'When',
+ 'list' => $send_date_when,
+ 'l_blank' => false,
+ 'required' => $data.fieldRequired.send_date_when,
+ 'errorText' => 'When is Required',
+ 'dataError' => $data.fieldFail.send_date_when
+ ]}
+ {include file='ui/f6/select.html'}
+ </div>
</div>
- <div class="cell small-12">
- <div class="grid-x grid-margin-x">
- <div class="cell small-12 medium-shrink">
- <label>Immediate Action</label>
- <div class="switch">
- <input class="switch-input" type="radio" id="send_by2" name="send_by" value="action" required{if $notification.fieldData.send_by_action.value} checked{/if}>
- <label class="switch-paddle" for="send_by2"><span class="show-for-sr">Action</span></label>
- </div>
+ </div>
+ <div class="cell small-12">
+ <div class="grid-x grid-margin-x">
+ <div class="cell small-12 medium-shrink">
+ <label>Immediate Action</label>
+ <div class="switch">
+ <input class="switch-input" type="radio" id="send_by2" name="send_by" value="action" required{if $notification.fieldData.send_by_action.value} checked{/if}>
+ <label class="switch-paddle" for="send_by2"><span class="show-for-sr">Action</span></label>
</div>
- <div class="cell small-12 medium-auto">
-
- {* Send Action *}
- {$ui = [
- 'value' => $data.fieldData.send_action,
- 'field' => 'send_action',
- 'label' => 'Send Action',
- 'list' => $send_action,
- 'l_blank' => false,
- 'required' => $data.fieldRequired.send_action,
- 'errorText' => 'Send Action is Required',
- 'dataError' => $data.fieldFail.send_action
- ]}
- {include file='ui/f6/select.html'}
+ </div>
+ <div class="cell small-12 medium-auto">
+
+ {* Send Action *}
+ {$ui = [
+ 'value' => $data.fieldData.send_action,
+ 'field' => 'send_action',
+ 'label' => 'Send Action',
+ 'list' => $send_action,
+ 'l_blank' => false,
+ 'required' => $data.fieldRequired.send_action,
+ 'errorText' => 'Send Action is Required',
+ 'dataError' => $data.fieldFail.send_action
+ ]}
+ {include file='ui/f6/select.html'}
- </div>
</div>
</div>
</div>
+ </div>
+
+ {* To Email *}
+ {$ui = [
+ 'value' => $data.fieldData.to_email,
+ 'field' => 'to_email',
+ 'label' => 'To Email',
+ 'pattern' => 'email',
+ 'required' => $data.fieldRequired.to_email,
+ 'errorText' => 'To Email is Required to be valid email',
+ 'helpText' => 'Leave this field blank to send notice to proper {$account.email} address',
+ 'dataError' => $data.fieldFail.to_email
+ ]}
+ {include file='ui/f6/text.html'}
+
+ {* Subject *}
+ {$ui = [
+ 'value' => $data.fieldData.subject,
+ 'field' => 'subject',
+ 'label' => 'Subject',
+ 'required' => $data.fieldRequired.subject,
+ 'errorText' => 'Subject is Required',
+ 'dataError' => $data.fieldFail.subject
+ ]}
+ {include file='ui/f6/text.html'}
+
+ {* From *}
+ {$ui = [
+ 'value' => $data.fieldData.from_header,
+ 'field' => 'from_header',
+ 'label' => 'From',
+ 'pattern' => 'email',
+ 'required' => $data.fieldRequired.from_header,
+ 'errorText' => 'From is Required to be valid email',
+ 'dataError' => $data.fieldFail.from_header
+ ]}
+ {include file='ui/f6/text.html'}
+
+ {* Reply To *}
+ {$ui = [
+ 'value' => $data.fieldData.replyto,
+ 'field' => 'replyto',
+ 'label' => 'Reply To',
+ 'required' => $data.fieldRequired.replyto,
+ 'errorText' => 'Reply To is Required',
+ 'dataError' => $data.fieldFail.replyto
+ ]}
+ {include file='ui/f6/text.html'}
+
+ {* Message *}
+ {$ui = [
+ 'value' => $data.fieldData.message,
+ 'field' => 'message',
+ 'label' => 'Message',
+ 'height' => '250',
+ 'required' => $data.fieldRequired.message,
+ 'errortext' => 'Message is Required',
+ 'dataError' => $data.fieldFail.message
+ ]}
+ {include file='ui/f6/editor.html'}
+
+
+
+ <button class="button primary" type="submit">{if $notification_id}Update{else}Add{/if} Notification Type</button>
+
+ <a class="button secondary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=notifications">Cancel</a>
+
+ </fieldset>
+
+
+ <fieldset class="fieldset small-12 medium-6">
+
+ <legend>Merge Tag Description</legend>
+
+ <h4>Merge Tags</h4>
+ <p>The "merge tags" listed below may be used in the E-Mail message content
+ to include certain information about the Account or Invoice. Be sure to
+ include the "{literal}{{/literal}" and "{literal}}{/literal}" and "$" characters exactly as show.</p>
+
+ {html_table loop=$mergeTagsBilling cols=2 table_attr='border=0 width=400' caption='Billing Examples'}
+
+ {html_table loop=$mergeTagsContact cols=2 table_attr='border=0 width=400' caption='Contact Examples'}
+
+ {html_table loop=$mergeTagsInvoice cols=2 table_attr='border=0 width=400' caption='Only available using Immediate Action - Create Invoice'}
+
+ {html_table loop=$mergeTagsPayment cols=2 table_attr='border=0 width=400' caption='Only available using Immediate Action - Received Payment'}
+
+ </fieldset>
- {* To Email *}
- {$ui = [
- 'value' => $data.fieldData.to_email,
- 'field' => 'to_email',
- 'label' => 'To Email',
- 'pattern' => 'email',
- 'required' => $data.fieldRequired.to_email,
- 'errorText' => 'To Email is Required to be valid email',
- 'helpText' => 'Leave this field blank to send notice to proper {$account.email} address',
- 'dataError' => $data.fieldFail.to_email
- ]}
- {include file='ui/f6/text.html'}
-
- {* Subject *}
- {$ui = [
- 'value' => $data.fieldData.subject,
- 'field' => 'subject',
- 'label' => 'Subject',
- 'required' => $data.fieldRequired.subject,
- 'errorText' => 'Subject is Required',
- 'dataError' => $data.fieldFail.subject
- ]}
- {include file='ui/f6/text.html'}
-
- {* From *}
- {$ui = [
- 'value' => $data.fieldData.from_header,
- 'field' => 'from_header',
- 'label' => 'From',
- 'pattern' => 'email',
- 'required' => $data.fieldRequired.from_header,
- 'errorText' => 'From is Required to be valid email',
- 'dataError' => $data.fieldFail.from_header
- ]}
- {include file='ui/f6/text.html'}
-
- {* Reply To *}
- {$ui = [
- 'value' => $data.fieldData.replyto,
- 'field' => 'replyto',
- 'label' => 'Reply To',
- 'required' => $data.fieldRequired.replyto,
- 'errorText' => 'Reply To is Required',
- 'dataError' => $data.fieldFail.replyto
- ]}
- {include file='ui/f6/text.html'}
-
- {* Message *}
- {$ui = [
- 'value' => $data.fieldData.message,
- 'field' => 'message',
- 'label' => 'Message',
- 'height' => '250',
- 'required' => $data.fieldRequired.message,
- 'errortext' => 'Message is Required',
- 'dataError' => $data.fieldFail.message
- ]}
- {include file='ui/f6/editor.html'}
-
-
-
- <button class="button primary" type="submit">{if $notification_id}Update{else}Add{/if} Notification Type</button>
-
- <a class="button secondary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=notifications">Cancel</a>
-
- </fieldset>
-
-
- <fieldset class="fieldset small-12 medium-6">
-
- <legend>Merge Tag Description</legend>
-
- <h4>Merge Tags</h4>
- <p>The "merge tags" listed below may be used in the E-Mail message content
- to include certain information about the Account or Invoice. Be sure to
- include the "{literal}{{/literal}" and "{literal}}{/literal}" and "$" characters exactly as show.</p>
-
- {html_table loop=$mergeTagsBilling cols=2 table_attr='border=0 width=400' caption='Billing Examples'}
-
- {html_table loop=$mergeTagsContact cols=2 table_attr='border=0 width=400' caption='Contact Examples'}
-
- {html_table loop=$mergeTagsInvoice cols=2 table_attr='border=0 width=400' caption='Only available using Immediate Action - Create Invoice'}
-
- {html_table loop=$mergeTagsPayment cols=2 table_attr='border=0 width=400' caption='Only available using Immediate Action - Received Payment'}
-
- </fieldset>
-
- </div>
</div>
+</div>
- {include file='ui/f6/errorCallout.html'}
+{* Error Callout *}
+{include file='ui/f6/errorCallout.html'}
-</form>
+{* Form End *}
+{include file='ui/f6/form-end.html'}
{* </div> *}
{include file='ui/f6/grid-end.html'}
});
</script>
+{* Footer *}
{include file='admin/billing/footer.html'}
+{* index (Dashboard) *}
+
{if $fromMemberMenu}
{include file='admin/member/header.html'}
{include file='admin/billing/memberBillingSubHeader.html'}
{include file='admin/billing/header.html'}
{/if}
-<div class="callout grid-container">
-
- <h3 class="subheader">Accounts</h3>
-
- <div>
- <a class="button secondary" href="#" id="exportAccountsButton">Accounts Export</a>
- <a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=add">Create Invoice</a>
- <a class="button success" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=payments&option=add">Make Payment</a>
- </div>
-
- {* Search Form *}
- {include file='admin/billing/accountSearchForm.html'}
- {include file='ui/f6/form-end.html'}
-
- {foreach $dashboards as $dashboard_title => $list}
- <br clear="all">
- <span class="label warning">{$dashboard_title}</span>
- <table class="stack glm-admin-table-inner">
- <thead>
- <tr>
- <th>Member Name</th>
- <th>Billing Email</th>
- <th>Anniversary Date</th>
- <th>Renewal Date</th>
- </tr>
- </thead>
- <tbody>
- {if $list.number > 0}
- {foreach $list.data.list as $t}
- <tr class="glm-account-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
- <td> <b id="account-ref-dest-{$t.id}">{$t.ref_name}</b> </td>
- <td> {$t.email} </td>
- <td> {$t.anniversary_date.date} </td>
- <td> {$t.renewal_date.date} </td>
- </tr>
- <tr id="account-container-{$t.id}" class="glm-account-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
+{* Grid Start *}
+{$ui = [
+ 'nowrap' => false,
+ 'backgroundColor' => '',
+ 'sectionColor' => ''
+]}
+{include file='ui/f6/grid-start.html'}
+
+<h3 class="subheader">Accounts</h3>
+
+<div>
+ <a class="button secondary" href="#" id="exportAccountsButton">Accounts Export</a>
+ <a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=add">Create Invoice</a>
+ <a class="button success" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=payments&option=add">Make Payment</a>
+</div>
+
+{* Search Form *}
+{include file='admin/billing/accountSearchForm.html'}
+{include file='ui/f6/form-end.html'}
+
+{foreach $dashboards as $dashboard_title => $list}
+ <br clear="all">
+ <span class="label warning">{$dashboard_title}</span>
+ <table class="stack glm-admin-table-inner">
+ <thead>
+ <tr>
+ <th>Member Name</th>
+ <th>Billing Email</th>
+ <th>Anniversary Date</th>
+ <th>Renewal Date</th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $list.number > 0}
+ {foreach $list.data.list as $t}
+ <tr class="glm-account-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
+ <td> <b id="account-ref-dest-{$t.id}">{$t.ref_name}</b> </td>
+ <td> {$t.email} </td>
+ <td> {$t.anniversary_date.date} </td>
+ <td> {$t.renewal_date.date} </td>
+ </tr>
+ <tr id="account-container-{$t.id}" class="glm-account-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
+ <td colspan="4">
+ <span class="account-dashboard-link">
+ <a title="Opens in a new window" class="account-member-dashboard" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&member={$t.ref_dest}" target="_blank">Member Dashboard</a> |
+ </span>
+ <span class="account-dashboard-link">
+ <a class="account-member-statements" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}">View Statements</a> |
+ </span>
+ <span class="account-dashboard-link">
+ <a class="account-billing" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=account&member={$t.ref_dest}">Billing Info</a>
+ </span>
+ {if $t.boss.value}
+ <span class="account-dashboard-link">
+ | <a class="account-employees" data-id="{$t.id}" href="#">View Employees</a>
+ </span>
+ {/if}
+ </td>
+ </tr>
+ {if $t.boss.value}
+ <tr id="account-employees-{$t.id}" class="{if $t@iteration is div by 2} alternate{/if}" style="display: none; background-color: #fff;">
<td colspan="4">
- <span class="account-dashboard-link">
- <a title="Opens in a new window" class="account-member-dashboard" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&member={$t.ref_dest}" target="_blank">Member Dashboard</a> |
- </span>
- <span class="account-dashboard-link">
- <a class="account-member-statements" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}">View Statements</a> |
- </span>
- <span class="account-dashboard-link">
- <a class="account-billing" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=account&member={$t.ref_dest}">Billing Info</a>
- </span>
- {if $t.boss.value}
- <span class="account-dashboard-link">
- | <a class="account-employees" data-id="{$t.id}" href="#">View Employees</a>
- </span>
- {/if}
+ <div class="glm-row" style="margin-bottom: 0px !important; margin-top: .5rem;">
+ {foreach $t.employees as $emp}
+ <div class="glm-columns glm-medium-2">{$emp.ref_name}</div>
+ {/foreach}
+ </div>
+ <div class="glm-row">
+ <div class="glm-columns glm-small-7">
+ <button class="glm-employee-cancel button button-secondary" data-id="{$t.id}">Cancel</button>
+ </div>
+ </div>
</td>
</tr>
- {if $t.boss.value}
- <tr id="account-employees-{$t.id}" class="{if $t@iteration is div by 2} alternate{/if}" style="display: none; background-color: #fff;">
- <td colspan="4">
- <div class="glm-row" style="margin-bottom: 0px !important; margin-top: .5rem;">
- {foreach $t.employees as $emp}
- <div class="glm-columns glm-medium-2">{$emp.ref_name}</div>
- {/foreach}
- </div>
- <div class="glm-row">
- <div class="glm-columns glm-small-7">
- <button class="glm-employee-cancel button button-secondary" data-id="{$t.id}">Cancel</button>
- </div>
- </div>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- </tbody>
- </table>
- <br clear="all">
- {/foreach}
-
- {include file='admin/billing/exportBillingModal.html'}
-
- <script>
- jQuery(document).ready(function($){
-
- var accountHoverId = false;
- var accountEmployee = false;
-
- $('.glm-account-row').mouseenter( function(){
- if ( accountEmployee ) {
- return;
- }
- // Hide all
- $( '.glm-account-links' ).addClass( 'glm-hidden' );
-
- accountHoverId = $(this).data('id');
- $( '#account-container-' + accountHoverId ).removeClass( 'glm-hidden' );
- });
- $('.glm-admin-table-inner').mouseleave( function() {
- $( '#account-container-' + accountHoverId ).addClass( 'glm-hidden' );
- });
-
- $('.account-employees').on( 'click', function(e){
- e.preventDefault();
- accountLinksEmployeesSelected();
- var account_id = $(this).data('id');
- console.log('account_id: ', account_id);
- $('#account-employees-' + account_id).show();
- } );
-
- $('.glm-employee-cancel').on('click', function(e){
- e.preventDefault();
- clearAccountLinks();
- var account_id = $(this).data('id');
- $('#account-employees-' + account_id).hide();
- });
-
- function accountLinksEmployeesSelected() {
- accountEmployee = true;
- console.log( 'accountHoverId: ', accountHoverId );
- $('#account-container-' + accountHoverId).addClass('glm-hidden');
- }
+ {/if}
+ {/foreach}
+ {/if}
+ </tbody>
+ </table>
+ <br clear="all">
+{/foreach}
+
+{include file='admin/billing/exportBillingModal.html'}
- function clearAccountLinks() {
- accountLinksEmployeesSelected();
- accountHoverId = false;
- accountEmployee = false;
+<script>
+ jQuery(document).ready(function($){
+
+ var accountHoverId = false;
+ var accountEmployee = false;
+
+ $('.glm-account-row').mouseenter( function(){
+ if ( accountEmployee ) {
+ return;
}
+ // Hide all
+ $( '.glm-account-links' ).addClass( 'glm-hidden' );
+ accountHoverId = $(this).data('id');
+ $( '#account-container-' + accountHoverId ).removeClass( 'glm-hidden' );
+ });
+ $('.glm-admin-table-inner').mouseleave( function() {
+ $( '#account-container-' + accountHoverId ).addClass( 'glm-hidden' );
+ });
+ $('.account-employees').on( 'click', function(e){
+ e.preventDefault();
+ accountLinksEmployeesSelected();
+ var account_id = $(this).data('id');
+ console.log('account_id: ', account_id);
+ $('#account-employees-' + account_id).show();
+ } );
+
+ $('.glm-employee-cancel').on('click', function(e){
+ e.preventDefault();
+ clearAccountLinks();
+ var account_id = $(this).data('id');
+ $('#account-employees-' + account_id).hide();
});
- </script>
- {include file='admin/billing/accountReveals.html'}
-</div>
+ function accountLinksEmployeesSelected() {
+ accountEmployee = true;
+ console.log( 'accountHoverId: ', accountHoverId );
+ $('#account-container-' + accountHoverId).addClass('glm-hidden');
+ }
+
+ function clearAccountLinks() {
+ accountLinksEmployeesSelected();
+ accountHoverId = false;
+ accountEmployee = false;
+ }
+
+
+ });
+</script>
+
+{* account reveals *}
+{include file='admin/billing/accountReveals.html'}
+
+{* Grid End *}
+{include file='ui/f6/grid-end.html'}
+{* Footer *}
{include file='admin/billing/footer.html'}
-{include file='admin/billing/header.html'}
+{* Invoices *}
-<div class="callout grid-container">
-
- <h3 class="subheader">Invoices</h3>
-
- <a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=add">Create Invoice</a>
- {if $invoiceSent}<p><span class="glm-notice glm-flash-updated">Invoice Sent</span></p>{/if}
-
- {* Form Start *}
- {$ui = [
- 'id' => 'searchForm',
- 'action' => "{$thisUrl}?page={$thisPage}",
- 'method' => 'post'
- ]}
- {include file='ui/f6/form-start.html'}
-
- <input type="hidden" name="glm_action" value="invoices">
- <input type="hidden" name="option" value="list">
-
- <input type="hidden" name="searched" value="1">
- <input type="hidden" name="prevStart" value="{$prevStart}">
- <input type="hidden" name="nextStart" value="{$nextStart}">
- <input type="hidden" name="limit" value="{$limit}">
-
- <fieldset class="fieldset cell small-12">
- <legend>Search Invoices</legend>
- <div class="grid-container full">
- <div class="grid-x grid-padding-x">
- <div class="cell small-12 medium-4">
- <label>From Date: </label>
- <input type="text" name="fromDate" value="{$fromDate}" class="glm-form-text-input-short glm-date-input">
- <label>To Date: </label>
- <input type="text" name="toDate" value="{$toDate}" class="glm-form-text-input-short glm-date-input">
- </div>
- <div class="cell small-12 medium-4">
- <label>Member Account: </label>
- <input id="member-account" type="hidden" name="filterAccounts" value="{$filterAccounts}">
- <input id="account_name" type="text" name="searchName" value="{if !empty($smarty.request.searchName)}{$smarty.request.searchName}{/if}" />
- <label>Invoice #: </label>
- <input id="member-invoice-id" type="hidden" name="filterInvoice" value="{$filterInvoices|default:''}">
- <input id="invoiceId" type="text" name="searchInvoice" value="" />
- </div>
- <div class="cell small-12 medium-4">
- <label>
- <input type="checkbox" name="filterUnpaid"{if !empty($smarty.request.filterUnpaid) && $smarty.request.filterUnpaid} checked{/if}>
- Show only Unpaid Invoices
- </label>
- </div>
- <div class="billing-search-form-submit">
- <input type="submit" class="button primary" value="Submit">
- </div>
+{* Header *}
+{include file='admin/billing/header.html'}
+{* Grid Start *}
+{$ui = [
+ 'nowrap' => false,
+ 'backgroundColor' => '',
+ 'sectionColor' => ''
+]}
+{include file='ui/f6/grid-start.html'}
+
+<h3 class="subheader">Invoices</h3>
+
+<a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=add">Create Invoice</a>
+{if $invoiceSent}<p><span class="glm-notice glm-flash-updated">Invoice Sent</span></p>{/if}
+
+{* Form Start *}
+{$ui = [
+ 'id' => 'searchForm',
+ 'action' => "{$thisUrl}?page={$thisPage}",
+ 'method' => 'post'
+]}
+{include file='ui/f6/form-start.html'}
+
+<input type="hidden" name="glm_action" value="invoices">
+<input type="hidden" name="option" value="list">
+
+<input type="hidden" name="searched" value="1">
+<input type="hidden" name="prevStart" value="{$prevStart}">
+<input type="hidden" name="nextStart" value="{$nextStart}">
+<input type="hidden" name="limit" value="{$limit}">
+
+<fieldset class="fieldset cell small-12">
+ <legend>Search Invoices</legend>
+ <div class="grid-container full">
+ <div class="grid-x grid-padding-x">
+ <div class="cell small-12 medium-4">
+ <label>From Date: </label>
+ <input type="text" name="fromDate" value="{$fromDate}" class="glm-form-text-input-short glm-date-input">
+ <label>To Date: </label>
+ <input type="text" name="toDate" value="{$toDate}" class="glm-form-text-input-short glm-date-input">
+ </div>
+ <div class="cell small-12 medium-4">
+ <label>Member Account: </label>
+ <input id="member-account" type="hidden" name="filterAccounts" value="{$filterAccounts}">
+ <input id="account_name" type="text" name="searchName" value="{if !empty($smarty.request.searchName)}{$smarty.request.searchName}{/if}" />
+ <label>Invoice #: </label>
+ <input id="member-invoice-id" type="hidden" name="filterInvoice" value="{$filterInvoices|default:''}">
+ <input id="invoiceId" type="text" name="searchInvoice" value="" />
+ </div>
+ <div class="cell small-12 medium-4">
+ <label>
+ <input type="checkbox" name="filterUnpaid"{if !empty($smarty.request.filterUnpaid) && $smarty.request.filterUnpaid} checked{/if}>
+ Show only Unpaid Invoices
+ </label>
</div>
+ <div class="billing-search-form-submit">
+ <input type="submit" class="button primary" value="Submit">
+ </div>
+
</div>
- </fieldset>
+ </div>
+</fieldset>
- <br clear="all">
+<br clear="all">
- <p>Total found: <span class="label">{$totalInvoices}</span></p>
+<p>Total found: <span class="label">{$totalInvoices}</span></p>
{if $paging}
- <input type="Submit" name="pageSelect" value="Previous {$limit} Invoices" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
- <input type="Submit" name="pageSelect" value="Next {$limit} Invoices" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+<input type="Submit" name="pageSelect" value="Previous {$limit} Invoices" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+<input type="Submit" name="pageSelect" value="Next {$limit} Invoices" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
{/if}
- <br clear="all">
-
- <table class="stack glm-admin-table-inner">
- <thead>
- <tr>
- <th width="80">Invoice #</th>
- <th>Member Name</th>
- <th>Invoice For</th>
- <th width="150">Time</th>
- <th width="80">Due Date</th>
- <th width="120">Amount Total</th>
- <th width="120">Balance</th>
- </tr>
- </thead>
- <tbody>
- {if $haveInvoices}
- {foreach $invoices as $t}
- <tr class="glm-invoice-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
- <td> {$t.id} </td>
- <td> <b>{$t.member_name}</b> </td>
- <td>
- {foreach $t.line_items as $item}
- {$item.name} {if $item.recurring && $item.recurrence_string}( {$item.recurrence_string} ){/if}
- {/foreach}
- </td>
- <td> {$t.transaction_time.datetime} </td>
- <td> {$t.due_date.date} </td>
- <td> {$t.amount_total} </td>
- <td> {$t.balance} </td>
- </tr>
- <tr id="invoice-container-{$t.id}" class="glm-invoice-links hide-for-large {if $t@iteration is div by 2} alternate{/if}">
- <td colspan="7">
- <span class="account-dashboard-link">
- <a href="{$adminUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=edit&id={$t.id}">Edit</a> |
- </span>
- <span class="account-dashboard-link">
- {if isset( $settings.invoice_pdf_enabled ) && $settings.invoice_pdf_enabled}
- <a href="{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createPDFInvoice&id={$t.id}" target="_blank">Print</a> |
- {else}
- <a href="{$thisUrl}?page={$thisPage}&glm_action=invoices&option=view&id={$t.id}" target="_blank">View</a> |
- {/if}
- </span>
- <span class="account-dashboard-link">
- {if $t.paid.value}
-
+<br clear="all">
+
+<table class="stack glm-admin-table-inner">
+ <thead>
+ <tr>
+ <th width="80">Invoice #</th>
+ <th>Member Name</th>
+ <th>Invoice For</th>
+ <th width="150">Time</th>
+ <th width="80">Due Date</th>
+ <th width="120">Amount Total</th>
+ <th width="120">Balance</th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $haveInvoices}
+ {foreach $invoices as $t}
+ <tr class="glm-invoice-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
+ <td> {$t.id} </td>
+ <td> <b>{$t.member_name}</b> </td>
+ <td>
+ {foreach $t.line_items as $item}
+ {$item.name} {if $item.recurring && $item.recurrence_string}( {$item.recurrence_string} ){/if}
+ {/foreach}
+ </td>
+ <td> {$t.transaction_time.datetime} </td>
+ <td> {$t.due_date.date} </td>
+ <td> {$t.amount_total} </td>
+ <td> {$t.balance} </td>
+ </tr>
+ <tr id="invoice-container-{$t.id}" class="glm-invoice-links hide-for-large {if $t@iteration is div by 2} alternate{/if}">
+ <td colspan="7">
+ <span class="account-dashboard-link">
+ <a href="{$adminUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=edit&id={$t.id}">Edit</a> |
+ </span>
+ <span class="account-dashboard-link">
+ {if isset( $settings.invoice_pdf_enabled ) && $settings.invoice_pdf_enabled}
+ <a href="{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createPDFInvoice&id={$t.id}" target="_blank">Print</a> |
+ {else}
+ <a href="{$thisUrl}?page={$thisPage}&glm_action=invoices&option=view&id={$t.id}" target="_blank">View</a> |
+ {/if}
+ </span>
+ <span class="account-dashboard-link">
+ {if $t.paid.value}
+
+ {else}
+ <a class="send-invoice-link" href="#"
+ data-id="{$t.id}"
+ data-member="{$t.member_id}"
+ data-account="{$t.account.value}"
+ data-member_name="{$t.member_name}"
+ >Send Invoice</a> |
+ {if $billing_settings.uptravel_payment_form}
+ <a class="make-a-payment" data-member="{$t.member_id}" href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=makepaymentadjustment&member={$t.member_id}">Make A Payment</a> |
{else}
- <a class="send-invoice-link" href="#"
- data-id="{$t.id}"
- data-member="{$t.member_id}"
- data-account="{$t.account.value}"
- data-member_name="{$t.member_name}"
- >Send Invoice</a> |
- {if $billing_settings.uptravel_payment_form}
- <a class="make-a-payment" data-member="{$t.member_id}" href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=makepaymentadjustment&member={$t.member_id}">Make A Payment</a> |
- {else}
- <a class="pay-invoice" data-member="{$t.member_id}" href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=makepayment&member={$t.member_id}">Pay Invoice</a> |
- {/if}
+ <a class="pay-invoice" data-member="{$t.member_id}" href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=makepayment&member={$t.member_id}">Pay Invoice</a> |
{/if}
- </span>
- <span class="account-dashboard-link">
- <a onClick="return confirm('This will delete the invoice. This cannot be undone. Are you Sure?');"
- href="{$thisUrl}?page={$thisPage}&glm_action=invoices&option=delete&invoice_id={$t.id}">Delete</a>
- </span>
- </td>
- </tr>
- {/foreach}
- {else}
- <tr class="alternate"><td colspan="2">(no Invoices listed)</td></tr>
- {/if}
- </tbody>
- </table>
-
- {if $paging}
- <input type="Submit" name="pageSelect" value="Previous {$limit} Invoices" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
- <input type="Submit" name="pageSelect" value="Next {$limit} Invoices" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
- {/if}
-
- {* Form End *}
- {include file='ui/f6/form-end.html'}
-
- <div id="send-invoice-form" title="Send Invoice">
- <form id="invoice-form" action="{$thisUrl}?page={$thisPage}" method="post">
- <input type="hidden" name="glm_action" value="invoices" />
- <input type="hidden" name="option" value="send_invoice" />
- <input type="hidden" id="invoice_id" name="invoice_id" value="" />
- <input type="hidden" id="member_id" name="member_id" value="" />
- <input type="hidden" id="account_id" name="account_id" value="" />
- Send an invoice to <span id="member_name"></span><br>
- Email Invoice Status <span id="email_invoice"></span><br>
- </form>
- </div>
+ {/if}
+ </span>
+ <span class="account-dashboard-link">
+ <a onClick="return confirm('This will delete the invoice. This cannot be undone. Are you Sure?');"
+ href="{$thisUrl}?page={$thisPage}&glm_action=invoices&option=delete&invoice_id={$t.id}">Delete</a>
+ </span>
+ </td>
+ </tr>
+ {/foreach}
+ {else}
+ <tr class="alternate"><td colspan="2">(no Invoices listed)</td></tr>
+ {/if}
+ </tbody>
+</table>
- {* Reveal for Billing Payments *}
- <div id="glmBillingPayment" class="medium reveal" data-reveal data-close-on-click="false">
- </div>
- {* Ajax Loading Graphic *}
- <div id="glmLoading" class="" style="display:none; position: absolute; left: 50%; top: 50vh;width: 100%; height: 100%;z-index: 9999;">
- <img src="{$pluginAssetsUrl}loading25.gif">
- </div>
- {* Reveal for Payment Success *}
- <div class="small reveal" id="billingSuccess" data-reveal>
- <h2>Payment Complete!</h2>
- <div class="callout success">
- <p>Successfully saved your data!</p>
- <button class="close-button show-for-small-only" data-close aria-label="Close" type="button">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <button class="close-button" data-close aria-label="Close" type="button">
+{if $paging}
+ <input type="Submit" name="pageSelect" value="Previous {$limit} Invoices" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+ <input type="Submit" name="pageSelect" value="Next {$limit} Invoices" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+{/if}
+
+{* Form End *}
+{include file='ui/f6/form-end.html'}
+
+<div id="send-invoice-form" title="Send Invoice">
+ <form id="invoice-form" action="{$thisUrl}?page={$thisPage}" method="post">
+ <input type="hidden" name="glm_action" value="invoices" />
+ <input type="hidden" name="option" value="send_invoice" />
+ <input type="hidden" id="invoice_id" name="invoice_id" value="" />
+ <input type="hidden" id="member_id" name="member_id" value="" />
+ <input type="hidden" id="account_id" name="account_id" value="" />
+ Send an invoice to <span id="member_name"></span><br>
+ Email Invoice Status <span id="email_invoice"></span><br>
+ </form>
+</div>
+
+{* Reveal for Billing Payments *}
+<div id="glmBillingPayment" class="medium reveal" data-reveal data-close-on-click="false">
+</div>
+{* Ajax Loading Graphic *}
+<div id="glmLoading" class="" style="display:none; position: absolute; left: 50%; top: 50vh;width: 100%; height: 100%;z-index: 9999;">
+ <img src="{$pluginAssetsUrl}loading25.gif">
+</div>
+{* Reveal for Payment Success *}
+<div class="small reveal" id="billingSuccess" data-reveal>
+ <h2>Payment Complete!</h2>
+ <div class="callout success">
+ <p>Successfully saved your data!</p>
+ <button class="close-button show-for-small-only" data-close aria-label="Close" type="button">
<span aria-hidden="true">×</span>
</button>
</div>
+ <button class="close-button" data-close aria-label="Close" type="button">
+ <span aria-hidden="true">×</span>
+ </button>
</div>
+{* Grid End *}
+{include file='ui/f6/grid-end.html'}
+
<script>
jQuery(document).ready(function($) {
{include file='admin/billing/header.html'}
-<div class="callout grid-container">
+{* Grid Start *}
+{$ui = [
+ 'nowrap' => false,
+ 'backgroundColor' => '',
+ 'sectionColor' => ''
+]}
+{include file='ui/f6/grid-start.html'}
- <h3 class="subheader">Invoicing</h3>
- {* include file='admin/billing/invoicingSubHeader.html' *}
+<h3 class="subheader">Invoicing</h3>
+{* include file='admin/billing/invoicingSubHeader.html' *}
- {if $option}
- <h4 class="subheader">
- {if $option == 'createInvoices'}
- Create Invoices
- {elseif $option == 'printInvoices'}
- Print Invoices
- {elseif $option == 'createLabels'}
- Create Labes
- {elseif $option == 'sendEmails'}
- Send Emails
- {/if}
- </h4>
- {/if}
+{if $option}
+ <h4 class="subheader">
+ {if $option == 'createInvoices'}
+ Create Invoices
+ {elseif $option == 'printInvoices'}
+ Print Invoices
+ {elseif $option == 'createLabels'}
+ Create Labes
+ {elseif $option == 'sendEmails'}
+ Send Emails
+ {/if}
+ </h4>
+{/if}
- <form id="invoicing-form" action="{$thisUrl}?page={$thisPage}" method="get">
- <input type="hidden" name="page" value="{$thisPage}">
- <input type="hidden" name="glm_action" value="invoicing">
- <input type="hidden" name="option" value="{$option}">
- <input type="hidden" name="prevStart" value="{$prevStart}">
- <input type="hidden" name="nextStart" value="{$nextStart}">
- <input type="hidden" name="limit" value="{$limit}">
+{* Form Start *}
+{$ui = [
+ 'id' => 'invoicing-form',
+ 'action' => "{$thisUrl}?page={$thisPage}",
+ 'method' => 'get',
+ 'file' => false
+]}
+{include file='ui/f6/form-start.html'}
- <fieldset class="fieldset cell small-12">
- <legend>Filter</legend>
- <div class="grid-container full">
- <div class="grid-x grid-padding-x">
- {if $paymentTypes}
- <div class="cell small-12 medium-2">
- <label>Payment Types:</label><br>
- <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>
- </div>
- {/if}
- {if $counties}
- <div class="cell small-12 medium-2">
- <label>Counties:</label><br>
- <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>
- </div>
- {/if}
- {if $option == 'createLabels'}
- <div class="cell small-12 medium-2">
- <br>
- <label>
- <input class="labelOption" type="checkbox" name="only_payment_due"{if isset($smarty.request.only_payment_due) && $smarty.request.only_payment_due} checked{/if}>
- Only Payments Due<br>
- </label>
- <label>
- <input id="exportCSV" type="checkbox" name="export_file"{if isset($smarty.request.export_file) && $smarty.request.export_file} checked{/if}>
- Export as CSV File<br>
- </label>
+<input type="hidden" name="page" value="{$thisPage}">
+<input type="hidden" name="glm_action" value="invoicing">
+<input type="hidden" name="option" value="{$option}">
+<input type="hidden" name="prevStart" value="{$prevStart}">
+<input type="hidden" name="nextStart" value="{$nextStart}">
+<input type="hidden" name="limit" value="{$limit}">
+
+<fieldset class="fieldset cell small-12">
+ <legend>Filter</legend>
+ <div class="grid-container full">
+ <div class="grid-x grid-padding-x">
+ {if $paymentTypes}
+ <div class="cell small-12 medium-2">
+ <label>Payment Types:</label><br>
+ <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>
+ </div>
+ {/if}
+ {if $counties}
+ <div class="cell small-12 medium-2">
+ <label>Counties:</label><br>
+ <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>
+ </div>
+ {/if}
+ {if $option == 'createLabels'}
+ <div class="cell small-12 medium-2">
+ <br>
+ <label>
+ <input class="labelOption" type="checkbox" name="only_payment_due"{if isset($smarty.request.only_payment_due) && $smarty.request.only_payment_due} checked{/if}>
+ Only Payments Due<br>
+ </label>
+ <label>
+ <input id="exportCSV" type="checkbox" name="export_file"{if isset($smarty.request.export_file) && $smarty.request.export_file} checked{/if}>
+ Export as CSV File<br>
+ </label>
+ <label>
+ <input class="labelOption" type="checkbox" name="no_contact_name"{if isset($smarty.request.no_contact_name) && $smarty.request.no_contact_name} checked{/if}>
+ Remove Member Billing Contact<br>
+ </label>
+ </div>
+ {/if}
+ {if $option == 'sendEmails'}
+ <div class="cell small-12 medium-2">
+ <label>Email Notification:</label><br>
+ {if $notification_types}
+ {foreach $notification_types as $notice}
<label>
- <input class="labelOption" type="checkbox" name="no_contact_name"{if isset($smarty.request.no_contact_name) && $smarty.request.no_contact_name} checked{/if}>
- Remove Member Billing Contact<br>
+ <input class="labelOption" type="radio" name="notification_id" value="{$notice.id}" required>
+ {$notice.name}<br>
</label>
- </div>
- {/if}
- {if $option == 'sendEmails'}
- <div class="cell small-12 medium-2">
- <label>Email Notification:</label><br>
- {if $notification_types}
- {foreach $notification_types as $notice}
- <label>
- <input class="labelOption" type="radio" name="notification_id" value="{$notice.id}" required>
- {$notice.name}<br>
- </label>
- {/foreach}
- {/if}
- </div>
+ {/foreach}
{/if}
- <div class="cell small-12 medium-auto">
- <input class="button primary" type="submit" value="Filter">
- {if $option == 'createInvoices'}
- <input class="button primary" type="submit" name="submitType" value="Create Invoices" onClick="return( confirm( 'Are you Sure?' ) );">
- {elseif $option == 'printInvoices'}
- <input class="button primary" id="print-invoices" type="submit" name="submitType" value="Print Invoices">
- {elseif $option == 'createLabels'}
- <input class="button primary" id="create-labels" type="submit" name="submitType" value="Create Labels">
- {elseif $option == 'sendEmails'}
- <input class="button primary" type="submit" name="submitType" value="Send Emails">
- {/if}
- </div>
</div>
- </div>
- </fieldset>
- <br clear="all">
- <br clear="all">
- <p>Total found: <span class="label">{$totalAccounts}</span></p>
- {if $successMsg}<p><span class="glm-notice glm-flash-updated">{$successMsg}</span></p>{/if}
- {* 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="stack">
- <thead>
- <tr>
- <th> Member Name </th>
- {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
- <th style="width: 200px;"> Account Number </th>
- {/if}
- <th style="width: 200px;"> Payment Type </th>
- <th style="width: 100px;"> Balance Due </th>
- </tr>
- </thead>
- {if isset( $accounts ) && !empty( $accounts )}
- {foreach $accounts as $t}
- <tr>
- <td>
- <a title="Opens in a new window" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}" target="_blank">
- <b>{$t.member_name}</b>
- </a>
- </td>
- {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
- <td> {$t.account_number} </td>
- {/if}
- <td> {$t.payment_type} </td>
- <td> {$t.balance_due|string_format:"%.2f"} </td>
- </tr>
- {/foreach}
+ {/if}
+ <div class="cell small-12 medium-auto">
+ <input class="button primary" type="submit" value="Filter">
+ {if $option == 'createInvoices'}
+ <input class="button primary" type="submit" name="submitType" value="Create Invoices" onClick="return( confirm( 'Are you Sure?' ) );">
+ {elseif $option == 'printInvoices'}
+ <input class="button primary" id="print-invoices" type="submit" name="submitType" value="Print Invoices">
+ {elseif $option == 'createLabels'}
+ <input class="button primary" id="create-labels" type="submit" name="submitType" value="Create Labels">
+ {elseif $option == 'sendEmails'}
+ <input class="button primary" type="submit" name="submitType" value="Send Emails">
{/if}
- </table>
+ </div>
</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}>
+ </div>
+</fieldset>
+<br clear="all">
+<br clear="all">
+<p>Total found: <span class="label">{$totalAccounts}</span></p>
+{if $successMsg}<p><span class="glm-notice glm-flash-updated">{$successMsg}</span></p>{/if}
+{* 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="stack">
+ <thead>
+ <tr>
+ <th> Member Name </th>
+ {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
+ <th style="width: 200px;"> Account Number </th>
+ {/if}
+ <th style="width: 200px;"> Payment Type </th>
+ <th style="width: 100px;"> Balance Due </th>
+ </tr>
+ </thead>
+ {if isset( $accounts ) && !empty( $accounts )}
+ {foreach $accounts as $t}
+ <tr>
+ <td>
+ <a title="Opens in a new window" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}" target="_blank">
+ <b>{$t.member_name}</b>
+ </a>
+ </td>
+ {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
+ <td> {$t.account_number} </td>
+ {/if}
+ <td> {$t.payment_type} </td>
+ <td> {$t.balance_due|string_format:"%.2f"} </td>
+ </tr>
+ {/foreach}
{/if}
- </form>
- <script>
- jQuery(document).ready(function($) {
- $('#print-invoices').on( 'click', function(e){
- e.preventDefault();
- var formData = $('#invoicing-form select').serialize();
- console.log( 'Form Data:', formData );
- window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=printInvoices&' + formData;
- } );
- $('#create-labels').on( 'click', function(e){
- e.preventDefault();
- var formData = $('#invoicing-form select, input.labelOption').serialize();
- console.log( 'Form Data:', formData );
- // Check if the Export as CSV file was checked.
- if ( $('#exportCSV:checked').length ) {
- console.log( 'exportCSV: ON' );
- window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createCSVLabels&' + formData;
- } else {
- console.log( 'exportCSV: OFF' );
- window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createPDFLabels&' + formData;
- }
- } );
- });
- </script>
+ </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 End *}
+{include file='ui/f6/form-end.html'}
+
+{* Grid End *}
+{include file='ui/f6/grid-end.html'}
+
+<script>
+jQuery(document).ready(function($) {
+ $('#print-invoices').on( 'click', function(e){
+ e.preventDefault();
+ var formData = $('#invoicing-form select').serialize();
+ console.log( 'Form Data:', formData );
+ window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=printInvoices&' + formData;
+ } );
+ $('#create-labels').on( 'click', function(e){
+ e.preventDefault();
+ var formData = $('#invoicing-form select, input.labelOption').serialize();
+ console.log( 'Form Data:', formData );
+ // Check if the Export as CSV file was checked.
+ if ( $('#exportCSV:checked').length ) {
+ console.log( 'exportCSV: ON' );
+ window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createCSVLabels&' + formData;
+ } else {
+ console.log( 'exportCSV: OFF' );
+ window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createPDFLabels&' + formData;
+ }
+ } );
+});
+</script>
+
+{* Footer *}
{include file='admin/billing/footer.html'}
+{* Payments *}
+
+{* Header *}
{include file='admin/billing/header.html'}
-<div class="callout grid-container">
+{* Grid Start *}
+{$ui = [
+ 'nowrap' => false,
+ 'backgroundColor' => '',
+ 'sectionColor' => ''
+]}
+{include file='ui/f6/grid-start.html'}
- <h3 class="subheader">Payments</h3>
+<h3 class="subheader">Payments</h3>
- <div class="button-group">
- <div id="exportPaymentsButton" class="button secondary">Payments Export</div>
- <a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=payments&option=add">Make Payment</a>
- </div>
+<div class="button-group">
+ <div id="exportPaymentsButton" class="button secondary">Payments Export</div>
+ <a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=payments&option=add">Make Payment</a>
+</div>
- {* Form Start *}
- {$ui = [
- 'id' => 'searchForm',
- 'action' => "{$thisUrl}?page={$thisPage}",
- 'method' => 'post'
- ]}
- {include file='ui/f6/form-start.html'}
-
- <input type="hidden" name="glm_action" value="payments">
- <input type="hidden" name="option" value="list">
-
- <input type="hidden" name="searched" value="1">
- <input type="hidden" name="prevStart" value="{$prevStart}">
- <input type="hidden" name="nextStart" value="{$nextStart}">
- <input type="hidden" name="limit" value="{$limit}">
-
- <fieldset class="fieldset cell small-12">
- <legend>Search Payments</legend>
- <div class="grid-container full">
- <div class="grid-x grid-padding-x">
- <div class="cell small-12 medium-3">
- <b>From Date: </b><input type="text" name="fromDate" value="{$fromDate}" class="glm-form-text-input-short glm-date-input">
- </div>
- <div class="cell small-12 medium-3">
- <b>To Date: </b><input type="text" name="toDate" value="{$toDate}" class="glm-form-text-input-short glm-date-input">
- </div>
- <div class="cell small-12 medium-3">
- <b>Member Account: </b>
- <input id="member-account" type="hidden" name="filterAccounts" value="{$filterAccounts}">
- <input id="account_name" type="text" name="searchName" value="{if $searchName}{$searchName}{/if}" />
- </div>
- <div class="cell small-12">
- <input class="button primary" type="submit" value="Submit">
- </div>
+{* Form Start *}
+{$ui = [
+ 'id' => 'searchForm',
+ 'action' => "{$thisUrl}?page={$thisPage}",
+ 'method' => 'post'
+]}
+{include file='ui/f6/form-start.html'}
+
+<input type="hidden" name="glm_action" value="payments">
+<input type="hidden" name="option" value="list">
+
+<input type="hidden" name="searched" value="1">
+<input type="hidden" name="prevStart" value="{$prevStart}">
+<input type="hidden" name="nextStart" value="{$nextStart}">
+<input type="hidden" name="limit" value="{$limit}">
+
+<fieldset class="fieldset cell small-12">
+ <legend>Search Payments</legend>
+ <div class="grid-container full">
+ <div class="grid-x grid-padding-x">
+ <div class="cell small-12 medium-3">
+ <b>From Date: </b><input type="text" name="fromDate" value="{$fromDate}" class="glm-form-text-input-short glm-date-input">
+ </div>
+ <div class="cell small-12 medium-3">
+ <b>To Date: </b><input type="text" name="toDate" value="{$toDate}" class="glm-form-text-input-short glm-date-input">
+ </div>
+ <div class="cell small-12 medium-3">
+ <b>Member Account: </b>
+ <input id="member-account" type="hidden" name="filterAccounts" value="{$filterAccounts}">
+ <input id="account_name" type="text" name="searchName" value="{if $searchName}{$searchName}{/if}" />
+ </div>
+ <div class="cell small-12">
+ <input class="button primary" type="submit" value="Submit">
</div>
</div>
- </fieldset>
+ </div>
+</fieldset>
+
+<br clear="all">
+<p>Total found: <span class="label">{$numbDisplayed}</span></p>
+{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">
- <p>Total found: <span class="label">{$numbDisplayed}</span></p>
- {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">
-
- <table class="stack glm-admin-table-inner">
- <thead>
- <tr>
- <th>Member Name</th>
- <th>Time</th>
- <th>Amount</th>
- <th>Payment Method</td>
- <th>Payment Notes</th>
- </tr>
- </thead>
- <tbody>
- {if $havePayments}
- {assign var="i" value="0"}
- {foreach $payments as $t}
- <tr class="glm-payment-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
- <td> <b>{$t.member_name}</b> </td>
- <td> {$t.transaction_time.datetime} </td>
- <td> {$t.amount|string_format:"%.2f"} </td>
- <td> {$t.payment_method} </td>
- <td> {$t.payment_data} </td>
- </tr>
- <tr id="payment-container-{$t.id}" class="glm-payment-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
- <td colspan="5">
- <span class="account-dashboard-link">
- <a onClick="return confirm('This will delete the payment. This cannot be undone. Are you Sure?');" href="{$thisUrl}?page={$thisPage}&glm_action=payments&option=delete&payment_id={$t.id}">Delete</a>
- </span>
- </td>
- </tr>
- {/foreach}
- {else}
- <tr class="alternate"><td colspan="2">(no Payments listed)</td></tr>
- {/if}
- </tbody>
- </table>
-
- {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 End *}
- {include file='ui/f6/form-end.html'}
-
- <script type="text/javascript">
- jQuery(document).ready(function($) {
-
- var paymentHoverId = false;
-
- $('.glm-payment-row').mouseenter( function(){
- // Hide all
- $( '.glm-payment-links' ).addClass( 'glm-hidden' );
-
- paymentHoverId = $(this).data('id');
- $( '#payment-container-' + paymentHoverId ).removeClass( 'glm-hidden' );
- });
- $('.glm-admin-table-inner').mouseleave( function() {
- $( '#payment-container-' + paymentHoverId ).addClass( 'glm-hidden' );
- });
-
- // Date Input
- $('.glm-date-input').datepicker({
- dateFormat: 'mm/dd/yy'
- });
-
- var availableAccounts = [
- {foreach $allAccounts as $m}
- { label: "{$m.ref_name|unescape:'html'|replace:'"':''}", value: "{$m.ref_name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
+<table class="stack glm-admin-table-inner">
+ <thead>
+ <tr>
+ <th>Member Name</th>
+ <th>Time</th>
+ <th>Amount</th>
+ <th>Payment Method</td>
+ <th>Payment Notes</th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $havePayments}
+ {assign var="i" value="0"}
+ {foreach $payments as $t}
+ <tr class="glm-payment-row{if $t@iteration is div by 2} alternate{/if}" data-id="{$t.id}">
+ <td> <b>{$t.member_name}</b> </td>
+ <td> {$t.transaction_time.datetime} </td>
+ <td> {$t.amount|string_format:"%.2f"} </td>
+ <td> {$t.payment_method} </td>
+ <td> {$t.payment_data} </td>
+ </tr>
+ <tr id="payment-container-{$t.id}" class="glm-payment-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
+ <td colspan="5">
+ <span class="account-dashboard-link">
+ <a onClick="return confirm('This will delete the payment. This cannot be undone. Are you Sure?');" href="{$thisUrl}?page={$thisPage}&glm_action=payments&option=delete&payment_id={$t.id}">Delete</a>
+ </span>
+ </td>
+ </tr>
{/foreach}
- ]
+ {else}
+ <tr class="alternate"><td colspan="2">(no Payments listed)</td></tr>
+ {/if}
+ </tbody>
+</table>
+
+{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 End *}
+{include file='ui/f6/form-end.html'}
- // Setup autocomplete for both inputs
- $('#account_name').autocomplete({
- source: availableAccounts,
- select: function( event, ui ){
- $('#member-account').val( ui.item.id );
+<script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ var paymentHoverId = false;
+
+ $('.glm-payment-row').mouseenter( function(){
+ // Hide all
+ $( '.glm-payment-links' ).addClass( 'glm-hidden' );
+
+ paymentHoverId = $(this).data('id');
+ $( '#payment-container-' + paymentHoverId ).removeClass( 'glm-hidden' );
+ });
+ $('.glm-admin-table-inner').mouseleave( function() {
+ $( '#payment-container-' + paymentHoverId ).addClass( 'glm-hidden' );
+ });
+
+ // Date Input
+ $('.glm-date-input').datepicker({
+ dateFormat: 'mm/dd/yy'
+ });
+
+ var availableAccounts = [
+ {foreach $allAccounts as $m}
+ { label: "{$m.ref_name|unescape:'html'|replace:'"':''}", value: "{$m.ref_name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
+ {/foreach}
+ ]
+
+ // Setup autocomplete for both inputs
+ $('#account_name').autocomplete({
+ source: availableAccounts,
+ select: function( event, ui ){
+ $('#member-account').val( ui.item.id );
+ $('#searchForm').submit();
+ },
+ change: function( event, ui) {
+ if( ui.item == null ) {
+ $('#member-account').val( '' );
$('#searchForm').submit();
- },
- change: function( event, ui) {
- if( ui.item == null ) {
- $('#member-account').val( '' );
- $('#searchForm').submit();
- }
- },
- });
+ }
+ },
});
- </script>
+ });
+</script>
- {include file='admin/billing/exportPaymentModal.html'}
+{* Payment Modals *}
+{include file='admin/billing/exportPaymentModal.html'}
-</div>
+{* Grid End *}
+{include file='ui/f6/grid-end.html'}
+
+{* Footer *}
{include file='admin/billing/footer.html'}
{include file='admin/billing/header.html'}
<div class="callout grid-container">
- <h3 class="subheader">Reports</h3>
- {* include file='admin/billing/reportsSubHeader.html' *}
+<h3 class="subheader">Reports</h3>
+{* include file='admin/billing/reportsSubHeader.html' *}
- {if $option}
- <h4 class="subheader">
- {if $option == 'openAccounts'}
- Open Accounts
- {elseif $option == 'closedAccounts'}
- Closed Accounts
- {elseif $option == 'accountsByAge'}
- Accounts By Age
- {elseif $option == 'reportGenerator'}
- Report Generator
- {elseif $option == 'noAccounts'}
- No Accounts
- {elseif $option == 'allAccounts'}
- All Accounts
- {/if}
- </h4>
- {/if}
+{if $option}
+ <h4 class="subheader">
+ {if $option == 'openAccounts'}
+ Open Accounts
+ {elseif $option == 'closedAccounts'}
+ Closed Accounts
+ {elseif $option == 'accountsByAge'}
+ Accounts By Age
+ {elseif $option == 'reportGenerator'}
+ Report Generator
+ {elseif $option == 'noAccounts'}
+ No Accounts
+ {elseif $option == 'allAccounts'}
+ All Accounts
+ {/if}
+ </h4>
+{/if}
- {if $option == 'reportGenerator'}
- <div id="exportReportsButton" class="button secondary">Report Export</div>
- {/if}
+{if $option == 'reportGenerator'}
+ <div id="exportReportsButton" class="button secondary">Report Export</div>
+{/if}
- <form id="reports-form" action="{$thisUrl}?page={$thisPage}" method="get">
- <input type="hidden" name="page" value="{$thisPage}">
- <input type="hidden" name="glm_action" value="reports">
- <input type="hidden" name="option" value="{$option}">
- <input type="hidden" name="prevStart" value="{$prevStart}">
- <input type="hidden" name="nextStart" value="{$nextStart}">
- <input type="hidden" name="limit" value="{$limit}">
- {if $option == 'reportGenerator'}
- <fieldset class="fieldset cell small-12">
- <legend>Filter Reports</legend>
+{* Form Start *}
+{$ui = [
+ 'id' => 'reports-form',
+ 'action' => "{$thisUrl}?page={$thisPage}",
+ 'method' => 'get',
+ 'file' => false
+]}
+{include file='ui/f6/form-start.html'}
- <div class="grid-container">
+<input type="hidden" name="page" value="{$thisPage}">
+<input type="hidden" name="glm_action" value="reports">
+<input type="hidden" name="option" value="{$option}">
+<input type="hidden" name="prevStart" value="{$prevStart}">
+<input type="hidden" name="nextStart" value="{$nextStart}">
+<input type="hidden" name="limit" value="{$limit}">
+{if $option == 'reportGenerator'}
+ <fieldset class="fieldset cell small-12">
+ <legend>Filter Reports</legend>
- <div class="grid-x grid-padding-x">
+ <div class="grid-container">
- {if $paymentTypes}
- <div class="cell small-12 medium-auto">
+ <div class="grid-x grid-padding-x">
- {* Payment Types *}
- {$ui = [
- 'value' => $smarty.request.invoice_types,
- 'field' => 'invoice_types',
- 'label' => 'Payment Types',
- 'list' => $paymentTypes,
- 'l_label' => 'name',
- 'l_value' => 'id',
- 'l_blank' => false,
- 'l_size' => 10,
- 'required' => false,
- 'errorText' => 'Payment Types is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/multiselect.html'}
+ {if $paymentTypes}
+ <div class="cell small-12 medium-auto">
- </div>
- {/if}
+ {* Payment Types *}
+ {$ui = [
+ 'value' => $smarty.request.invoice_types,
+ 'field' => 'invoice_types',
+ 'label' => 'Payment Types',
+ 'list' => $paymentTypes,
+ 'l_label' => 'name',
+ 'l_value' => 'id',
+ 'l_blank' => false,
+ 'l_size' => 10,
+ 'required' => false,
+ 'errorText' => 'Payment Types is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/multiselect.html'}
- {if $counties}
- <div class="cell small-12 medium-auto">
+ </div>
+ {/if}
- {* Counties *}
- {$ui = [
- 'value' => $smarty.request.counties,
- 'field' => 'counties',
- 'label' => 'Counties',
- 'list' => $counties,
- 'l_label' => 'name',
- 'l_value' => 'id',
- 'l_blank' => false,
- 'l_size' => 10,
- 'required' => false,
- 'errorText' => 'Counties is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/multiselect.html'}
+ {if $counties}
+ <div class="cell small-12 medium-auto">
- </div>
- {/if}
- <div class="cell small-12 medium-auto">
+ {* Counties *}
+ {$ui = [
+ 'value' => $smarty.request.counties,
+ 'field' => 'counties',
+ 'label' => 'Counties',
+ 'list' => $counties,
+ 'l_label' => 'name',
+ 'l_value' => 'id',
+ 'l_blank' => false,
+ 'l_size' => 10,
+ 'required' => false,
+ 'errorText' => 'Counties is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/multiselect.html'}
- {* Member Name *}
- {$ui = [
- 'value' => $smarty.request.member_name,
- 'field' => 'member_name',
- 'label' => 'Member Name',
- 'required' => false,
- 'errorText' => 'Member Name is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/text.html'}
-
- {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
- {* Account Number *}
- {$ui = [
- 'value' => $smarty.request.account_number,
- 'field' => 'account_number',
- 'label' => 'Account Number',
- 'required' => false,
- 'errorText' => 'Account Number is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/text.html'}
- {/if}
+ </div>
+ {/if}
+ <div class="cell small-12 medium-auto">
- {* From *}
- {$ui = [
- 'value' => $smarty.request.from_date,
- 'field' => 'from_date',
- 'label' => 'From',
- 'required' => false,
- 'errorText' => 'From is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/text.html'}
+ {* Member Name *}
+ {$ui = [
+ 'value' => $smarty.request.member_name,
+ 'field' => 'member_name',
+ 'label' => 'Member Name',
+ 'required' => false,
+ 'errorText' => 'Member Name is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/text.html'}
- {* To *}
- {$ui = [
- 'value' => $smarty.request.to_date,
- 'field' => 'to_date',
- 'label' => 'To',
- 'required' => false,
- 'errorText' => 'To is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/text.html'}
+ {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
+ {* Account Number *}
+ {$ui = [
+ 'value' => $smarty.request.account_number,
+ 'field' => 'account_number',
+ 'label' => 'Account Number',
+ 'required' => false,
+ 'errorText' => 'Account Number is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/text.html'}
+ {/if}
- </div>
- <div class="cell small-12 medium-auto">
- {* Transaction Types *}
- {$ui = [
- 'value' => $smarty.request.transactionTypes,
- 'field' => 'transactionTypes',
- 'label' => 'Transaction Types',
- 'list' => $actionTypeSel,
- 'l_blank' => false,
- 'l_size' => 10,
- 'required' => false,
- 'errorText' => 'Transaction Types is Required',
- 'dataError' => ''
- ]}
- {include file='ui/f6/multiselect.html'}
+ {* From *}
+ {$ui = [
+ 'value' => $smarty.request.from_date,
+ 'field' => 'from_date',
+ 'label' => 'From',
+ 'required' => false,
+ 'errorText' => 'From is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/text.html'}
- </div>
- <div class="small-12">
- <input class="button primary" id="report_search" type="submit" value="Search">
- </div>
+ {* To *}
+ {$ui = [
+ 'value' => $smarty.request.to_date,
+ 'field' => 'to_date',
+ 'label' => 'To',
+ 'required' => false,
+ 'errorText' => 'To is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/text.html'}
- </div>
+ </div>
+ <div class="cell small-12 medium-auto">
+ {* Transaction Types *}
+ {$ui = [
+ 'value' => $smarty.request.transactionTypes,
+ 'field' => 'transactionTypes',
+ 'label' => 'Transaction Types',
+ 'list' => $actionTypeSel,
+ 'l_blank' => false,
+ 'l_size' => 10,
+ 'required' => false,
+ 'errorText' => 'Transaction Types is Required',
+ 'dataError' => ''
+ ]}
+ {include file='ui/f6/multiselect.html'}
</div>
+ <div class="small-12">
+ <input class="button primary" id="report_search" type="submit" value="Search">
+ </div>
- </fieldset>
- {/if}
- {if $option == 'accountsByAge'}
- <h3>over 60 days</h3>
- {/if}
- <br clear="all">
- <br clear="all">
- <p>Total found: <span class="label">{$totalAccounts}</span></p>
- {* Paging *}
- {if $paging}
- <input type="Submit" name="pageSelect" value="Previous {$limit} Reports" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
- <input type="Submit" name="pageSelect" value="Next {$limit} Reports" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
- {/if}
- <br clear="all">
- {if isset( $accounts ) && !empty( $accounts )}
- <div id="account-list">
- <table class="stack glm-admin-table-inner">
- <thead>
- <tr>
- <th> Member Name </th>
- {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
- <th style="width: 200px;"> Account Number </th>
- {/if}
- <th style="width: 200px;"> Payment Type </th>
- <th style="width: 100px;"> Balance Due </th>
- </tr>
- </thead>
- {foreach $accounts as $t}
- <tr>
- <td>
- <a title="Opens in a new window" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}" target="_blank">
- {$t.member_name}
- </a>
- </td>
- {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
- <td> {$t.account_number} </td>
- {/if}
- <td> {$t.payment_type} </td>
- <td>
- {if $t.balance_due == 'N/A'}
- {$t.balance_due}
- {else}
- {$t.balance_due|string_format:"%.2f"}
- {/if}
- </td>
- </tr>
- {/foreach}
- </table>
- </div>
- {/if}
- {if isset( $transactions ) && !empty( $transactions )}
- <div id="invoice-list">
- <table class="wp-list-table widefat fixed posts glm-admin-table">
- <thead>
- <tr>
- <th> Transaction Time </th>
- <th> Type </th>
- <th> Member Name </th>
- <th> Description </th>
- <th> Amount </th>
- </tr>
- </thead>
- {foreach $transactions as $t}
- <tr>
- <td> {$t.transaction_time.datetime} </td>
- <td>
- {if $t.type == $tActionTypes.Invoice}
- Invoice
- {else}
- Payment
- {/if}
- </td>
- <td>
- <a title="Opens in a new window" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.member_id}" target="_blank">
- {$t.member_name}
- </a>
- </td>
- <td> {$t.notes} </td>
- <td>
- {if $t.type == 10}
- {$t.current_invoice_total|string_format:"%.2f"}
- {else}
- {$t.current_payment_total|string_format:"%.2f"}
- {/if}
- </td>
- </tr>
- {/foreach}
- </table>
</div>
- {/if}
- {* Paging *}
- {if $paging}
- <input type="submit" name="pageSelect" value="Previous {$limit} Reports" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
- <input type="submit" name="pageSelect" value="Next {$limit} Reports" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
- {/if}
- </form>
- {if $option == 'reportGenerator'}
- <div class="report-totals">
- <div class="total-invoices">Total Invoices: <span>{$totalInvoices}</span></div>
- <div class="total-payments">Total Payments: <span>{$totalPayments}</span></div>
+
</div>
- {/if}
- {include file='admin/billing/exportReportModal.html'}
+ </fieldset>
+{/if}
+{if $option == 'accountsByAge'}
+<h3>over 60 days</h3>
+{/if}
+<br clear="all">
+<br clear="all">
+<p>Total found: <span class="label">{$totalAccounts}</span></p>
+{* Paging *}
+{if $paging}
+ <input type="Submit" name="pageSelect" value="Previous {$limit} Reports" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+ <input type="Submit" name="pageSelect" value="Next {$limit} Reports" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+{/if}
+<br clear="all">
+{if isset( $accounts ) && !empty( $accounts )}
+ <div id="account-list">
+ <table class="stack glm-admin-table-inner">
+ <thead>
+ <tr>
+ <th> Member Name </th>
+ {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
+ <th style="width: 200px;"> Account Number </th>
+ {/if}
+ <th style="width: 200px;"> Payment Type </th>
+ <th style="width: 100px;"> Balance Due </th>
+ </tr>
+ </thead>
+ {foreach $accounts as $t}
+ <tr>
+ <td>
+ <a title="Opens in a new window" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}" target="_blank">
+ {$t.member_name}
+ </a>
+ </td>
+ {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
+ <td> {$t.account_number} </td>
+ {/if}
+ <td> {$t.payment_type} </td>
+ <td>
+ {if $t.balance_due == 'N/A'}
+ {$t.balance_due}
+ {else}
+ {$t.balance_due|string_format:"%.2f"}
+ {/if}
+ </td>
+ </tr>
+ {/foreach}
+ </table>
+ </div>
+{/if}
+{if isset( $transactions ) && !empty( $transactions )}
+ <div id="invoice-list">
+ <table class="wp-list-table widefat fixed posts glm-admin-table">
+ <thead>
+ <tr>
+ <th> Transaction Time </th>
+ <th> Type </th>
+ <th> Member Name </th>
+ <th> Description </th>
+ <th> Amount </th>
+ </tr>
+ </thead>
+ {foreach $transactions as $t}
+ <tr>
+ <td> {$t.transaction_time.datetime} </td>
+ <td>
+ {if $t.type == $tActionTypes.Invoice}
+ Invoice
+ {else}
+ Payment
+ {/if}
+ </td>
+ <td>
+ <a title="Opens in a new window" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.member_id}" target="_blank">
+ {$t.member_name}
+ </a>
+ </td>
+ <td> {$t.notes} </td>
+ <td>
+ {if $t.type == 10}
+ {$t.current_invoice_total|string_format:"%.2f"}
+ {else}
+ {$t.current_payment_total|string_format:"%.2f"}
+ {/if}
+ </td>
+ </tr>
+ {/foreach}
+ </table>
+ </div>
+{/if}
+{* Paging *}
+{if $paging}
+ <input type="submit" name="pageSelect" value="Previous {$limit} Reports" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+ <input type="submit" name="pageSelect" value="Next {$limit} Reports" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+{/if}
- <script>
- jQuery(document).ready(function($) {
- // Date Input
- $('.glm-date-input').datepicker({
- dateFormat: 'mm/dd/yy'
- });
+{* Form End *}
+{include file='ui/f6/form-end.html'}
- $('#report_search').on( 'click', function(e){
- // e.preventDefault();
- var formData = $('#reports-form select, input.reportForm').serialize();
- console.log( 'Form Data:', formData );
- // Check if the Export as CSV file was checked.
- if ( $('#qif:checked').length ) {
- console.log( 'exportCSV: ON' );
- window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=exportQIF&' + formData;
- return false;
- } else {
- // return true;
- $('#reportsForm').submit();
- }
- } );
+{if $option == 'reportGenerator'}
+ <div class="report-totals">
+ <div class="total-invoices">Total Invoices: <span>{$totalInvoices}</span></div>
+ <div class="total-payments">Total Payments: <span>{$totalPayments}</span></div>
+ </div>
+{/if}
- // Setup for the modal box
- $('#exportReportDialog').dialog( {
- autoOpen: false,
- minWidth: 700,
- dialogClass: 'glm-dialog-no-close'
- } );
- $('#exportReportsButton').click( function(){
- $('#exportReportDialog').dialog( 'open' );
- } );
- $('#exportReportsCancel').click( function(){
- $('#exportReportDialog').dialog( 'close' );
- } );
- $('#selectAllExportFields').click(function(){
- $('.exportFieldsTd input[type="checkbox"]').each(function(){
- $(this).prop('checked', true);
- });
+{* Report Export Modal *}
+{include file='admin/billing/exportReportModal.html'}
+
+{* Grid End *}
+{include file='ui/f6/grid-end.html'}
+
+<script>
+jQuery(document).ready(function($) {
+ // Date Input
+ $('.glm-date-input').datepicker({
+ dateFormat: 'mm/dd/yy'
+ });
+
+ $('#report_search').on( 'click', function(e){
+ // e.preventDefault();
+ var formData = $('#reports-form select, input.reportForm').serialize();
+ console.log( 'Form Data:', formData );
+ // Check if the Export as CSV file was checked.
+ if ( $('#qif:checked').length ) {
+ console.log( 'exportCSV: ON' );
+ window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=exportQIF&' + formData;
+ return false;
+ } else {
+ // return true;
+ $('#reportsForm').submit();
+ }
+ } );
+
+ // Setup for the modal box
+ $('#exportReportDialog').dialog( {
+ autoOpen: false,
+ minWidth: 700,
+ dialogClass: 'glm-dialog-no-close'
+ } );
+ $('#exportReportsButton').click( function(){
+ $('#exportReportDialog').dialog( 'open' );
+ } );
+ $('#exportReportsCancel').click( function(){
+ $('#exportReportDialog').dialog( 'close' );
+ } );
+ $('#selectAllExportFields').click(function(){
+ $('.exportFieldsTd input[type="checkbox"]').each(function(){
+ $(this).prop('checked', true);
});
- $('#unselectAllExportFields').click(function(){
- $('.exportFieldsTd input[type="checkbox"]').each(function(){
- $(this).prop('checked', false);
- });
+ });
+ $('#unselectAllExportFields').click(function(){
+ $('.exportFieldsTd input[type="checkbox"]').each(function(){
+ $(this).prop('checked', false);
});
});
- </script>
-</div>
+});
+</script>
+
+{* Footer *}
{include file='admin/billing/footer.html'}