Adding this to the admin billing invoices page.
WHERE ref_name like '%" . esc_sql( $searchName ) . "%')";
}
+ if ( isset( $_REQUEST['filterUnpaid'] ) ) {
+ $filterUnpaid = filter_var( $_REQUEST['filterUnpaid'], FILTER_VALIDATE_BOOLEAN );
+ if ( $filterUnpaid ) {
+ $where_params[] = "T.paid <> true";
+ }
+ }
if ( isset( $_REQUEST['filterPending'] ) ) {
$filterPending = filter_var( $_REQUEST['filterPending'], FILTER_VALIDATE_BOOLEAN );
$where_params[] = "T.paid <> true";
<input id="member-account" type="hidden" name="filterAccounts" value="{$filterAccounts}">
<input id="account_name" name="searchName" value="" />
</span>
+ <br>
+ <span class="glm-nowrap">
+ <input type="checkbox" name="filterUnpaid"{if $smarty.request.filterUnpaid} checked{/if}>
+ <b>Show only Unpaid Invoices</b>
+ </span>
<br>
<span class="glm-nowrap">
<input type="submit" value="Submit">