$totalInvoices = false;
$filterPending = false;
$filterOverdue = false;
+ $counties = false;
+ $paymentTypes = false;
// Get any provided option
if (isset($_REQUEST['option'])) {
switch ($option) {
case 'bulkadd':
$view = 'bulkAddInvoices';
+
+ // 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
+ );
+ }
+ $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
+ $paymentTypes = $BillingSupport->getAllPayableInvoiceTypes();
break;
case 'add':
'totalInvoices' => $totalInvoices,
'filterPending' => $filterPending,
'filterOverdue' => $filterOverdue,
+ 'counties' => $counties,
+ 'paymentTypes' => $paymentTypes,
);
// Return status, any suggested view, and any data to controller
{include file='admin/billing/subHeader.html'}
<h2>Bulk Create Invoices</h2>
-Test
+
+{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>
{include file='admin/footer.html'}
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>
- {* Bulk Add not ready yet
<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>