From: Steve Sutton Date: Fri, 30 Mar 2018 13:49:54 +0000 (-0400) Subject: Update view for the invoice. X-Git-Tag: v1.0.0^2~85 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=61b41608f6beb0985b42abbf65283f27d02e3d45;p=WP-Plugins%2Fglm-member-db-billing.git Update view for the invoice. When getting the payment data for viewing invoice need to get payment data not invoice_payment data. --- diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 7c2189d..8be0568 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -576,9 +576,11 @@ class GlmBillingSupport { return $this->wpdb->get_results( $this->wpdb->prepare( - "SELECT * - FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoice_payments - WHERE invoice = %d", + "SELECT P.* + FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "invoice_payments IP + LEFT OUTER JOIN " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "payments P + ON ( IP.payment = P.id ) + WHERE IP.invoice = %d", $invoice ), ARRAY_A