From cdc401dd7e1ad0827f96f511a65671d19c819c2a Mon Sep 17 00:00:00 2001 From: Joshua Fernandes Date: Mon, 13 Mar 2017 15:40:00 +0530 Subject: [PATCH] review change empty check --- 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 e962a4608..63f16fc94 100644 --- a/application/models/Sale.php +++ b/application/models/Sale.php @@ -536,7 +536,7 @@ class Sale extends CI_Model $total_amount = floatval($total_amount) + floatval($payment['payment_amount']); } - if(isset($customer_id) && $customer_id!= NULL && $this->config->item('customer_reward_enable') == TRUE){ + if((!empty (-$customer_id)) && $this->config->item('customer_reward_enable') == TRUE){ $package_id = $this->Customer->get_info($customer_id)->package_id; if(isset($package_id) && $package_id!=NULL){ $points_percent = $this->Customer_rewards->get_points_percent($package_id);