Esempio n. 1
0
 public function employeeName($employeeid)
 {
     $employeesModel = new Employees();
     $employee = $employeesModel->getById($employeeid);
     if (!$employee) {
         $employeeName = "Not Set";
     } else {
         $employeeName = $employee->lastname . ", " . $employee->firstname;
     }
     return $employeeName;
 }
Esempio n. 2
0
 public function employeeAcct($employeeid)
 {
     $employeesModel = new Employees();
     $employee = $employeesModel->getById($employeeid);
     return $employee->account_number;
 }
Esempio n. 3
0
 public function leavestatementAction()
 {
     $method = $this->getRequest()->getParam('method', 'html');
     $id = $this->getRequest()->getParam('id');
     $this->view->method = $method;
     $employeesModel = new Employees();
     $this->view->employee = $employeesModel->getById($id);
     $recordsModel = new Records();
     $this->view->records = $recordsModel->getAllByEmployee($id);
     if ($method == 'pdf') {
         error_reporting(0);
         $this->_helper->viewRenderer->setNoRender(true);
         $html = $this->view->render('user/leavestatement.phtml');
         $this->_helper->layout->disableLayout();
         require_once APPLICATION_PATH . "/../data/dompdf/dompdf_config.inc.php";
         $dompdf = new DOMPDF();
         $dompdf->load_html($html);
         $dompdf->render();
         $dompdf->stream("Leave_Statement-" . $this->view->employee->firstname . "-" . $this->view->employee->lastname . "-" . date('Y-m-d') . "." . $method);
     }
     if ($method == 'csv') {
         //$this->_helper->viewRenderer->setNoRender(true);
         $this->_helper->layout->disableLayout();
     }
 }