diff --git a/application/models/reports/Specific_customer.php b/application/models/reports/Specific_customer.php index 57aff5ea8..4a733ead2 100644 --- a/application/models/reports/Specific_customer.php +++ b/application/models/reports/Specific_customer.php @@ -69,14 +69,14 @@ class Specific_customer extends Report $this->db->from('sales_items_temp'); $this->db->where('customer_id', $inputs['customer_id']); - if ($inputs['payment_type'] != 'all') - { - $this->db->like('payment_type', $this->lang->line('sales_'.$inputs['payment_type'])); - } - elseif($inputs['payment_type'] == 'invoices') + if($inputs['payment_type'] == 'invoices') { $this->db->where('sale_type', SALE_TYPE_INVOICE); } + elseif ($inputs['payment_type'] != 'all') + { + $this->db->like('payment_type', $this->lang->line('sales_'.$inputs['payment_type'])); + } if($inputs['sale_type'] == 'complete') @@ -146,14 +146,14 @@ class Specific_customer extends Report $this->db->from('sales_items_temp'); $this->db->where('customer_id', $inputs['customer_id']); - if ($inputs['payment_type'] != 'all') - { - $this->db->like('payment_type', $this->lang->line('sales_'.$inputs['payment_type'])); - } - elseif($inputs['payment_type'] == 'invoices') + if($inputs['payment_type'] == 'invoices') { $this->db->where('sale_type', SALE_TYPE_INVOICE); } + elseif ($inputs['payment_type'] != 'all') + { + $this->db->like('payment_type', $this->lang->line('sales_'.$inputs['payment_type'])); + } if($inputs['sale_type'] == 'complete') {