public function admin_dashboard() { $data['announcement'] = Announcement_model::find_by_sql('SELECT * FROM tbl_announcement ORDER BY announcement_id DESC LIMIT 3 '); $data['birthday'] = Emp_info_model::find_by_sql('SELECT * FROM tbl_emp_info where MONTH(birthday) = MONTH(now()) ORDER BY DAY(birthday) ASC'); $data['total_employee'] = count(View_employees_list::find('all', array('conditions' => "status ='Existing'"))); $data['total_asset'] = count(View_assigned_assets_model::find('all')); $data['total_projects'] = count(Projects_model::find('all')); $data['departments'] = Departments_model::all(); $data['supervisors'] = View_supervisors::all(); $data['job_titles'] = Job_titles_model::all(); // $data['leaves'] = count(Leave_type_model::all()); $data['employment_type'] = Employment_type_model::all(); $data['vendors'] = Vendor_model::all(); $data['category'] = Asset_category_model::all(); $data['employee'] = Emp_info_model::all(); $data['existing'] = count(View_employees_list::find('all', array('conditions' => "status ='Existing'"))); $data['onleave'] = count(View_employees_list::find('all', array('conditions' => "status ='OnLeave'"))); $data['resigned'] = count(View_employees_list::find('all', array('conditions' => "status ='Resigned'"))); $data['pageTitle'] = 'Dashboard - MSInc.'; $data['content'] = 'employee/admin-dashboard'; $this->load->view($this->master_layout, $data); $this->display_notif(); }
public function add_stocks_quantity() { Restock_model::recordRestock(); $data['vendor'] = Vendor_model::all(); $data['stocks'] = View_stocks_model::all(); $data['pageTitle'] = 'Add Stock Quantity - MSInc.'; $data['content'] = 'asset/add_stock_quantity'; $this->load->view($this->master_layout, $data); }