From a1a4a57a036be92405e7beafbf6c082f1b6701ba Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 1 Apr 2019 16:46:56 -0400 Subject: [PATCH] Export reports complete Should only show button on report generator page. --- models/admin/ajax/reportsListExport.php | 4 ++-- models/admin/billing/reports.php | 2 +- views/admin/billing/exportReportModal.html | 13 +++++++++++-- views/admin/billing/reports.html | 10 +++++++--- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/models/admin/ajax/reportsListExport.php b/models/admin/ajax/reportsListExport.php index 2715f39..1e8c615 100644 --- a/models/admin/ajax/reportsListExport.php +++ b/models/admin/ajax/reportsListExport.php @@ -179,10 +179,10 @@ class GlmMembersAdmin_ajax_reportsListExport extends GlmDataTransactions $where = implode( ' AND ', $where_params ); // Get a current list of accounts without paging - $orderBy = 'transaction_time ASC'; + $orderBy = 'transaction_time ASC'; $this->member_data = true; $this->notes = true; - $list = $this->getList( $where, $orderBy, true ); + $list = $this->getList( $where, $orderBy, true ); // If we have list entries - even if it's an empty list $success = true; diff --git a/models/admin/billing/reports.php b/models/admin/billing/reports.php index d092f01..c7e4feb 100644 --- a/models/admin/billing/reports.php +++ b/models/admin/billing/reports.php @@ -206,7 +206,7 @@ class GlmMembersAdmin_billing_reports extends GlmDataTransactions case 'reportGenerator': // Check if Counties is enabled and fetch counties - if ( isset( $this->config['settings']['enable_counties'] ) && $this->config['settings']['enable_counties'] ) { + if ( isset( $this->config['settings']['billing_county_enabled'] ) && $this->config['settings']['billing_county_enabled'] ) { // Grab counties $counties = $this->wpdb->get_results( "SELECT * diff --git a/views/admin/billing/exportReportModal.html b/views/admin/billing/exportReportModal.html index 6c26944..e4047c6 100644 --- a/views/admin/billing/exportReportModal.html +++ b/views/admin/billing/exportReportModal.html @@ -47,10 +47,19 @@ Name Search: - - + + + {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled} + + Account Number Search: + + + + + + {/if} Fields to export: diff --git a/views/admin/billing/reports.html b/views/admin/billing/reports.html index 05acae7..826343e 100644 --- a/views/admin/billing/reports.html +++ b/views/admin/billing/reports.html @@ -2,7 +2,9 @@

Invoicing

{include file='admin/billing/reportsSubHeader.html'} -
Report Export
+{if $option == 'reportGenerator'} +
Report Export
+{/if}
@@ -36,8 +38,10 @@
- - + {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled} + + + {/if} -- 2.17.1