public function assetTransfer() { $details = array("asset_status" => $this->input->post('txtStatus'), "employee_id" => $this->input->post('txtEmployee'), "assigned_date" => date('Y-m-d')); $asset = Assets_model::find($this->input->post('txtAssetID')); if ($asset->update_attributes($details)) { $this->session->set_userdata('edited', 1); Audit_trail_model::auditAssignAsset($details, $this->input->post('txtAssetID')); redirect('ams/view_assets'); } }
public function add_asset_info() { $this->form_validation->set_rules('txtAssetID', 'Asset ID', 'trim|required'); $this->form_validation->set_rules('txtAssetName', 'Asset Name', 'trim|required'); $this->form_validation->set_rules('txtDescription', 'Description', 'trim|required'); $this->form_validation->set_rules('txtVendor', 'Asset Vendor', 'trim|required'); $this->form_validation->set_rules('txtCategory', 'Asset Category', 'trim'); $this->form_validation->set_rules('txtDateAcquired', 'Date Acquired', 'trim|required'); if ($this->form_validation->run()) { $details = Assets_info_model::assetsDetails(); if (Assets_info_model::create($details)) { Assets_model::newAssets(); $this->session->set_userdata('added', 1); Audit_trail_model::auditNewAsset($details); redirect('ams/view_assets'); } } }
public function retrieveEqReport() { require 'models/Assets_model.php'; $model = new Assets_model(); $modelStocks = $model->equipReports(); include 'views/assets/report/eqMakeReport.php'; }
public function asset_transfer() { Assets_model::assetTransfer(); }