From 488af06663d49fe689e8e9603cde3fa3285aa90d Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 3 May 2016 22:41:44 +0200 Subject: [PATCH] Fix delete in Item model (#507) --- application/models/Item.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/models/Item.php b/application/models/Item.php index 18bec9cad..7adaa036b 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -248,11 +248,9 @@ class Item extends CI_Model */ public function delete($item_id) { - $this->db->where('item_id', $item_id); - // set to 0 quantities $this->Item_quantity->reset_quantity($item_id); - + $this->db->where('item_id', $item_id); return $this->db->update('items', array('deleted'=>1)); }