mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-10 23:17:08 -04:00
Don't allow adding deleted Items by item_id in Sales register and Receiving (#664)
This commit is contained in:
@@ -4,10 +4,11 @@ class Item extends CI_Model
|
||||
/*
|
||||
Determines if a given item_id is an item
|
||||
*/
|
||||
public function exists($item_id)
|
||||
public function exists($item_id, $deleted = FALSE)
|
||||
{
|
||||
$this->db->from('items');
|
||||
$this->db->where('item_id', $item_id);
|
||||
$this->db->where('deleted', $deleted);
|
||||
|
||||
return ($this->db->get()->num_rows() == 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user