From 61b41608f6beb0985b42abbf65283f27d02e3d45 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 30 Mar 2018 09:49:54 -0400 Subject: [PATCH] Update view for the invoice. When getting the payment data for viewing invoice need to get payment data not invoice_payment data. --- classes/billingSupport.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.17.1