mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-23 08:38:37 -04:00
Don't allow adding deleted Items by item_id in Sales register and Receiving (#664)
This commit is contained in:
1 parent
936c74211f
commit
bbbf24c2a5
1 file changed
+2
-1
@@ -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