Пример #1
0
 public function delete_company_info()
 {
     $id = $this->input->get('id');
     $data = $this->input->get('table');
     if ($data == 'department') {
         $table = Departments_model::find($id);
     }
     if ($data == 'emp_type') {
         $table = Employment_type_model::find($id);
     }
     if ($data == 'supervisor') {
         $table = Supervisors_model::find($id);
     }
     if ($data == 'job_title') {
         $table = Job_titles_model::find($id);
     }
     if ($data == 'asset_category') {
         $table = Asset_category_model::find($id);
     }
     if ($data == 'vendor') {
         $table = Vendor_model::find($id);
     }
     if ($table->delete()) {
         $this->session->set_userdata('deleted', 1);
         redirect('ems/admin_dashboard');
     }
 }
Пример #2
0
 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);
 }