fix for create invoice page
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 15 May 2019 20:20:34 +0000 (16:20 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 15 May 2019 20:20:34 +0000 (16:20 -0400)
models/admin/billing/invoicing.php

index d1c4e4d..8cefd29 100644 (file)
@@ -170,6 +170,11 @@ class GlmMembersAdmin_billing_invoicing //extends GlmDataAccounts
                   FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX  . "invoices
                  WHERE due_date BETWEEN '$currentInvoiceDate' AND '$nextInvoiceDate'
                 ) ";
+            $wParts[] = " T.invoice_type NOT IN (
+                SELECT id
+                  FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoice_types
+                 WHERE dynamic_amount = true
+            ) ";
 
             if ( $option2 ) {
                 // $where used in all places.