Files
opensourcepos/application/libraries/Item_lib.php
jekkos e1ddcbbb5b Rename Item_quantities model to Item_quantity
Rename Stock_locations model to Stock_location
Fix barcode generation in receipts (sales + receivings)
2015-09-17 21:59:33 +02:00

34 lines
656 B
PHP

<?php
class Item_lib
{
var $CI;
function __construct()
{
$this->CI =& get_instance();
}
function get_item_location()
{
if(!$this->CI->session->userdata('item_location'))
{
$location_id = $this->CI->Stock_location->get_default_location_id();
$this->set_item_location($location_id);
}
return $this->CI->session->userdata('item_location');
}
function set_item_location($location)
{
$this->CI->session->set_userdata('item_location',$location);
}
function clear_item_location()
{
$this->CI->session->unset_userdata('item_location');
}
}
?>