From a895244c101cfa93ac995f897a40fe24b32af82e Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 13 Dec 2018 11:45:06 -0500 Subject: [PATCH] Updating reports and invoicing Working on list output for open accounts. --- models/admin/billing/reports.php | 9 +++++++-- views/admin/billing/invoices.html | 2 +- views/admin/billing/reports.html | 26 +------------------------- 3 files changed, 9 insertions(+), 28 deletions(-) diff --git a/models/admin/billing/reports.php b/models/admin/billing/reports.php index d208984..1f2377b 100644 --- a/models/admin/billing/reports.php +++ b/models/admin/billing/reports.php @@ -90,7 +90,7 @@ class GlmMembersAdmin_billing_reports extends GlmDataTransactions { $haveAccounts = false; - $option = 'list'; + $option = 'openAccounts'; $view = 'reports'; $wParts = array( 'true' ); $paymentTypes = false; @@ -139,8 +139,13 @@ class GlmMembersAdmin_billing_reports extends GlmDataTransactions // Do selected option switch ($option) { - case 'list': + case 'openAccounts': default: + $wParts[] = "T.id IN ( + SELECT account + FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoices + WHERE balance > 0.00 + )"; $view = 'reports'; break; diff --git a/views/admin/billing/invoices.html b/views/admin/billing/invoices.html index c5a139a..64b86c0 100644 --- a/views/admin/billing/invoices.html +++ b/views/admin/billing/invoices.html @@ -68,7 +68,7 @@ {if $haveInvoices} {foreach $invoices as $t} - {$t.member_name} + {$t.member_name} {foreach $t.line_items as $item} {$item.name} {if $item.recurring && $item.recurrence_string}( {$item.recurrence_string} ){/if} diff --git a/views/admin/billing/reports.html b/views/admin/billing/reports.html index 5f38cea..a48a860 100644 --- a/views/admin/billing/reports.html +++ b/views/admin/billing/reports.html @@ -30,32 +30,8 @@ {/if} - {if $option == 'createLabels'} -
-
- - - -
- {/if}
- - {if $option == 'createInvoices'} - - {elseif $option == 'printInvoices'} - - {elseif $option == 'createLabels'} - - {/if} +
{/if} -- 2.17.1