From 355ed6203049f19176c946da8b3beb74d66b0e3a Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 9 May 2019 15:59:30 -0400 Subject: [PATCH] Fix invoices printing also fix filter on labels page --- lib/GlmPDFInvoice.php | 2 ++ models/admin/billing/invoicing.php | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/GlmPDFInvoice.php b/lib/GlmPDFInvoice.php index ed29876..aab4a66 100644 --- a/lib/GlmPDFInvoice.php +++ b/lib/GlmPDFInvoice.php @@ -112,6 +112,7 @@ class GlmPDFInvoice extends Cezpdf // Right header for date and account # $this->ezSetY( $companyNameSaveY ); + $invoiceData = array(); // Add the Date of invoice and the member account number using ezTable. $invoiceData[] = array( 'header' => 'Date:', 'value' => date( 'm/d/Y', strtotime( $invoice['due_date'] ) ), 'headerFill' => $this->color_white, 'valueFill' => $this->color_white @@ -371,6 +372,7 @@ class GlmPDFInvoice extends Cezpdf $newY = $this->ezText( '', $this->pdf_font_size ); $newY = $this->addText( 375, $newY, 14, 'NO PAYMENT REQUIRED' ); } + $paymentForm3 = array(); if ( $showAccountNumber ) { $paymentForm3[] = array( 'header' => ''.$accountNumberLabel . ':', 'value' => $account['account_number'] ); } diff --git a/models/admin/billing/invoicing.php b/models/admin/billing/invoicing.php index 4e63ef4..0b9e619 100644 --- a/models/admin/billing/invoicing.php +++ b/models/admin/billing/invoicing.php @@ -140,7 +140,7 @@ class GlmMembersAdmin_billing_invoicing //extends GlmDataAccounts SELECT account FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoices WHERE $notPaid ) "; - $wParts[] = " ( T.usmail_invoice OR T.fax_invoice ) "; + $wParts[] = " ( T.usmail_invoice = true OR T.fax_invoice = true ) "; break; case 'createLabels': @@ -150,11 +150,11 @@ class GlmMembersAdmin_billing_invoicing //extends GlmDataAccounts FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoices WHERE $notPaid ) "; } else { - $wParts[] = " T.id IN ( - SELECT account - FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoices) "; + // $wParts[] = " T.id IN ( + // SELECT account + // FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoices) "; } - $wParts[] = " ( T.usmail_invoice OR T.fax_invoice ) "; + $wParts[] = " ( T.usmail_invoice = true OR T.fax_invoice = true ) "; break; case 'createInvoices': -- 2.17.1