mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-14 03:50:33 -04:00
Fix item select issue introduced with temp item feature
This commit is contained in:
committed by
FrancescoUK
parent
f49c896e4f
commit
3f12d57f82
@@ -698,7 +698,7 @@ class Sale_lib
|
||||
|
||||
public function add_item(&$item_id, $quantity = 1, $item_location, $discount = 0, $price_mode = PRICE_MODE_STANDARD, $kit_price_option = NULL, $kit_print_option = NULL, $price_override = NULL, $description = NULL, $serialnumber = NULL, $include_deleted = FALSE, $print_option = NULL )
|
||||
{
|
||||
$item_info = $this->CI->Item->get_info_by_id($item_id);
|
||||
$item_info = $this->CI->Item->get_info_by_id_or_number($item_id);
|
||||
|
||||
//make sure item exists
|
||||
if(empty($item_info))
|
||||
@@ -875,7 +875,7 @@ class Sale_lib
|
||||
//make sure item exists
|
||||
if($item_id != -1)
|
||||
{
|
||||
$item_info = $this->CI->Item->get_info_by_id($item_id);
|
||||
$item_info = $this->CI->Item->get_info_by_id_or_number($item_id);
|
||||
|
||||
if($item_info->stock_type == HAS_STOCK)
|
||||
{
|
||||
|
||||
@@ -351,26 +351,6 @@ class Item extends CI_Model
|
||||
return '';
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets information about a particular active item by item id
|
||||
*/
|
||||
public function get_info_by_id($item_id)
|
||||
{
|
||||
$this->db->from('items');
|
||||
|
||||
$this->db->where('items.item_id', (int) $item_id);
|
||||
|
||||
$this->db->where('items.deleted', 0);
|
||||
|
||||
$query = $this->db->get();
|
||||
|
||||
if($query->num_rows() == 1)
|
||||
{
|
||||
return $query->row();
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
/*
|
||||
Get an item id given an item number
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user