<?php
class Inventory_stock_report_model extends CI_Model {    
    function __construct(){
        parent::__construct();
		$this->category 		= TBL_INVENTORY_CATEGORY;
        $this->item 			= TBL_INVENTORY_ITEM;
        $this->unit 			= TBL_UNIT;
        $this->inv_log 			= TBL_INV_LOG;
    }
	
	public function get_category_by_id($category_id) {
        $this->db->select('name');
        $this->db->where('id',$category_id);
        return $this->db->get($this->category)->row()->name;
    }
	
	public function get_item_by_id($item_id) {
        $this->db->select('item_name');
        $this->db->where('id',$item_id);
        return $this->db->get($this->item)->row()->item_name;
    }
	
	public function get_itemcode_by_id($item_id) {
        $this->db->select('code');
        $this->db->where('id',$item_id);
        return $this->db->get($this->item)->row()->item_name;
    }
}