Update check for creating invoices list.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 31 Jul 2019 13:06:34 +0000 (09:06 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 31 Jul 2019 13:06:34 +0000 (09:06 -0400)
Don't try auto creating payment types with no amount or dynamic amount
ones.

models/admin/billing/invoicing.php

index ac1fa78..9ddde6e 100644 (file)
@@ -177,7 +177,7 @@ class GlmMembersAdmin_billing_invoicing //extends GlmDataAccounts
             $wParts[] = " T.invoice_type NOT IN (
                 SELECT id
                   FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoice_types
-                 WHERE dynamic_amount = true
+                 WHERE dynamic_amount = true OR amount <= 0.00
             ) ";
             // echo '<pre>$wParts: ' . print_r( $wParts, true ) . '</pre>';