So Uptra can export billing accounts per payment type.
)
);
+ if ( isset( $_REQUEST['invoice_types'] ) && $invoiceTypes = filter_var( $_REQUEST['invoice_types'], FILTER_VALIDATE_INT,array( 'flags' => FILTER_FORCE_ARRAY ) ) ) {
+ $where_params[] = "T.invoice_type IN (" . implode(',', $invoiceTypes) . ")";
+ }
if ( isset( $_REQUEST['fromDate'] ) && $_REQUEST['fromDate']
&& $fromDate = filter_var( $_REQUEST['fromDate'], FILTER_VALIDATE_REGEXP, $reg_options )
) {
$filterExpired = false;
$filterActive = false;
$searchName = false;
+ $paymentTypes = false;
+ $counties = false;
// Get any provided option
if ( isset( $_REQUEST['option'] ) ) {
}
+ $counties = $this->wpdb->get_results(
+ "SELECT *
+ FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "counties
+ ORDER BY name",
+ ARRAY_A
+ );
+ $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
+ $paymentTypes = $BillingSupport->getAllInvoiceTypes();
$templateData = array(
'option' => $option,
'filterExpired' => $filterExpired,
'filterActive' => $filterActive,
'filterArchived' => $filterArchived,
+ 'paymentTypes' => $paymentTypes,
+ 'counties' => $counties,
);
// Return status, any suggested view, and any data to controller
$filterActive = false;
$invoices = false;
$searchName = false;
+ $paymentTypes = false;
+ $counties = false;
// For lockedToMember
$lockedToMember = false;
}
+ $counties = $this->wpdb->get_results(
+ "SELECT *
+ FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "counties
+ ORDER BY name",
+ ARRAY_A
+ );
+ $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
+ $paymentTypes = $BillingSupport->getAllInvoiceTypes();
+
// Compile template data
$templateData = array(
'accountID' => $accountID,
'filterActive' => $filterActive,
'filterArchived' => $filterArchived,
'searchName' => $searchName,
- 'pluginAssetsUrl' => GLM_MEMBERS_BILLING_PLUGIN_BASE_URL . '/assets/'
+ 'pluginAssetsUrl' => GLM_MEMBERS_BILLING_PLUGIN_BASE_URL . '/assets/',
+ 'paymentTypes' => $paymentTypes,
+ 'counties' => $counties,
);
// Return status, any suggested view, and any data to controller
<input type="hidden" name="action" value="glm_members_admin_ajax">
<input type="hidden" name="glm_action" value="accountsListExport">
<table class="glm-admin-table unstriped">
+ <tr>
+ <th>Payment Types</th>
+ <td>
+ <select multiple size="5" id="invoice_types" name="invoice_types[]">
+ {foreach $paymentTypes as $paymentType}
+ <option value="{$paymentType.id}"
+ {if isset($smarty.request.invoice_types) && is_array( $smarty.request.invoice_types ) && in_array( $paymentType.id, $smarty.request.invoice_types )}
+ selected
+ {/if}>{$paymentType.name}</option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ {if $counties}
+ <tr>
+ <th>Counties</th>
+ <td>
+ <select multiple size="5" id="counties" 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>
+ </td>
+ </tr>
+ {/if}
<tr><th>Show Active: </th><td><input type="checkbox" name="filterActive" {if $filterActive}checked{/if}></td></tr>
<tr><th>Show Pending: </th><td><input type="checkbox" name="filterPending" {if $filterPending}checked{/if}></td></tr>
<tr><th>Show Overdue: </th><td><input type="checkbox" name="filterOverdue" {if $filterOverdue}checked{/if}></td></tr>