From 4b2b098a85586ba2115ec69a8b6c1204c0c66cc1 Mon Sep 17 00:00:00 2001 From: Jeroen Peelaerts Date: Tue, 17 Nov 2020 00:24:42 +0100 Subject: [PATCH] Add credit filter for payment types (#2983) --- application/models/Sale.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/models/Sale.php b/application/models/Sale.php index 90a7132b8..5e9c459c9 100644 --- a/application/models/Sale.php +++ b/application/models/Sale.php @@ -368,6 +368,11 @@ class Sale extends CI_Model $this->db->like('payment_type', $this->lang->line('sales_check')); } + if($filters['only_creditcard'] != FALSE) + { + $this->db->like('payment_type', $this->lang->line('sales_credit')); + } + $this->db->group_by('payment_type'); $payments = $this->db->get()->result_array();