From f359c475d303bb4d11ddf2bc65f132e574c9a8ee Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sun, 29 Jan 2017 19:31:02 +0000 Subject: [PATCH] Fix Takings issue (#932) --- application/models/Sale.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Sale.php b/application/models/Sale.php index 39cfb3d28..de27c1854 100644 --- a/application/models/Sale.php +++ b/application/models/Sale.php @@ -261,7 +261,7 @@ class Sale extends CI_Model { // get payment summary $this->db->select('payment_type, count(*) AS count, SUM(payment_amount) AS payment_amount'); - $this->db->from('sales'); + $this->db->from('sales AS sales'); $this->db->join('sales_payments', 'sales_payments.sale_id = sales.sale_id'); $this->db->join('people AS customer_p', 'sales.customer_id = customer_p.person_id', 'left'); $this->db->join('customers AS customer', 'sales.customer_id = customer.person_id', 'left');