public function insertProject() { $this->form_validation->set_rules('txtProjectID', 'Project ID', 'trim|required'); $this->form_validation->set_rules('txtProjectName', 'Project Name', 'trim|required'); $this->form_validation->set_rules('txtClient', 'Client Name', 'trim|required'); $this->form_validation->set_rules('txtStartingDate', 'Starting Date', 'trim|required'); $this->form_validation->set_rules('txtEndingDate', 'Ending Date', 'trim|required'); if ($this->form_validation->run()) { if (Projects_model::create(Projects_model::projectDetails())) { $this->session->set_userdata('added', 1); Audit_trail_model::auditNewProject($this->input->post('txtProjectName')); redirect('ams/view_projects'); } } }
public function material_list() { $num = 0; if ($this->input->post('btnFilter')) { $data['materials'] = $this->reports_model->getMaterial(); $num = count($data['materials']); } if ($this->input->post('btnPrint')) { $materials = $this->reports_model->getMaterial(); $this->print_material_list($materials); } $data['project'] = Projects_model::all(); $data['pageTitle'] = 'Bill of Materials Report - MSInc.'; $data['content'] = 'reports/material_list'; $this->load->view($this->master_layout, $data); if ($num != 0) { $this->display_notif('Successful! ' . $num . ' record found'); } }
public function add_personnel() { Project_worker_model::addPersonnel(); $data['project'] = Projects_model::all(); $data['employee'] = Emp_info_model::all(); $data['pageTitle'] = 'Project Personnel- MSInc.'; $data['content'] = 'employee/add_personnel'; $this->load->view($this->master_layout, $data); }
public function add_materials() { Materials_model::insertMaterials(); $data['record'] = Stock_info_model::all(); $data['project'] = Projects_model::all(); $data['pageTitle'] = 'Add Materials - MSInc.'; $data['content'] = 'asset/add_materials'; $this->load->view($this->master_layout, $data); }