Skip to content

Commit

Permalink
Merge pull request #3588 from sharanhayer/patch-2
Browse files Browse the repository at this point in the history
Incorrect Comparision condition
  • Loading branch information
danielkerr committed Nov 3, 2015
2 parents 5c4e325 + 70a451c commit 76a772f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/catalog/model/total/reward.php
Expand Up @@ -65,7 +65,7 @@ public function confirm($order_info, $order_total) {

$this->load->model('account/customer');

if ($this->model_account_customer->getRewardTotal($order_info['customer_id']) > $points) {
if ($this->model_account_customer->getRewardTotal($order_info['customer_id']) >= $points) {
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_reward SET customer_id = '" . (int)$order_info['customer_id'] . "', order_id = '" . (int)$order_info['order_id'] . "', description = '" . $this->db->escape(sprintf($this->language->get('text_order_id'), (int)$order_info['order_id'])) . "', points = '" . (float)-$points . "', date_added = NOW()");
} else {
return $this->config->get('config_fraud_status_id');
Expand Down

0 comments on commit 76a772f

Please sign in to comment.