From: Steve Sutton Date: Thu, 13 Dec 2018 16:45:06 +0000 (-0500) Subject: Updating reports and invoicing X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a895244c101cfa93ac995f897a40fe24b32af82e;p=WP-Plugins%2Fglm-member-db-billing.git Updating reports and invoicing Working on list output for open accounts. --- 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}