From 4558cf0e50fff2b633625b72d856d43e3042111c Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sat, 12 May 2018 13:42:47 +0100 Subject: [PATCH] Add spaces to SQL statement --- application/models/reports/Summary_payments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/reports/Summary_payments.php b/application/models/reports/Summary_payments.php index dde9f4ac9..4054b06d1 100644 --- a/application/models/reports/Summary_payments.php +++ b/application/models/reports/Summary_payments.php @@ -14,7 +14,7 @@ class Summary_payments extends Summary_report public function getData(array $inputs) { - $this->db->select('sales_payments.payment_type, COUNT(DISTINCT sales_payments.sale_id) AS count, SUM(sales_items.item_unit_price*sales_items.quantity_purchased * (1 - sales_items.discount_percent / 100)) AS payment_amount'); + $this->db->select('sales_payments.payment_type, COUNT(DISTINCT sales_payments.sale_id) AS count, SUM(sales_items.item_unit_price * sales_items.quantity_purchased * (1 - sales_items.discount_percent / 100)) AS payment_amount'); $this->db->from('sales_payments AS sales_payments'); $this->db->join('sales AS sales', 'sales.sale_id = sales_payments.sale_id'); $this->db->join('sales_items AS sales_items', 'sales_items.sale_id = sales_payments.sale_id', 'left');