Fix delete in Item model (#507)

This commit is contained in:
jekkos
2016-05-03 22:41:44 +02:00
parent de711b82dd
commit 488af06663

View File

@@ -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));
}