public function getmanagersratingsAction()
 {
     $id = $this->_request->getParam('id');
     $ffinitModel = new Default_Model_Feedforwardinit();
     $ffdata = $ffinitModel->getFFbyBUDept($id);
     $mgrRatData = $ffinitModel->getManagerRatingsByFFId($id);
     $this->view->ffData = $ffdata[0];
     $this->view->mgrRatData = $mgrRatData;
 }
 public function indexAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $businessunit_id = $auth->getStorage()->read()->businessunit_id;
         $department_id = $auth->getStorage()->read()->department_id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $ffinitModel = new Default_Model_Feedforwardinit();
     $ffDataArr = $ffinitModel->getFFbyBUDept('', 'yes');
     $this->view->ffdataarr = $ffDataArr;
 }
Пример #3
0
 public function checkffduedate()
 {
     $ffinitModel = new Default_Model_Feedforwardinit();
     $ffEmpRatModel = new Default_Model_Feedforwardemployeeratings();
     $ffDataArr = $ffinitModel->getFFbyBUDept('', 'yes');
     $ffIdArr = array();
     $ffIdList = '';
     $current_day = new DateTime('now');
     $current_day->sub(new DateInterval('P1D'));
     if (!empty($ffDataArr)) {
         foreach ($ffDataArr as $ffval) {
             if ($ffval['status'] == 1) {
                 if ($ffval['ff_due_date']) {
                     $due_date = new DateTime($ffval['ff_due_date']);
                 } else {
                     $due_date = '';
                 }
                 $interval = $current_day->diff($due_date);
                 $interval->format('%d');
                 $interval = $interval->days;
                 if ($interval <= 2) {
                     array_push($ffIdArr, $ffval['id']);
                 }
             }
         }
     }
     if (!empty($ffIdArr)) {
         $ffIdList = implode(',', $ffIdArr);
     }
     if ($ffIdList != '') {
         $ffEmpsStatusData = $ffEmpRatModel->getEmpsFFStatus($ffIdList, 'cron');
         if (!empty($ffEmpsStatusData)) {
             $empIdArr = array();
             foreach ($ffEmpsStatusData as $empval) {
                 array_push($empIdArr, $empval['emailaddress']);
             }
             $optionArr = array('subject' => 'Manager Feedforward submission pending', 'header' => 'Feedforward', 'toemail' => SUPERADMIN_EMAIL, 'toname' => 'Super Admin', 'bcc' => $empIdArr, 'message' => "<div style='padding: 0; text-align: left; font-size:14px; font-family:Arial, Helvetica, sans-serif;'>\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='color:#3b3b3b;'>Hi, </span><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='padding:20px 0 0 0;color:#3b3b3b;'>Mangaer feedforward is pending.</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='padding:20px 0 10px 0;'>Please <a href=" . BASE_URL . " target='_blank' style='color:#b3512f;'>click here</a> to login  to your <b>" . APPLICATION_NAME . "</b> account to check the details.</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div> ", 'cron' => 'yes');
             sapp_PerformanceHelper::saveCronMail($optionArr);
         }
     }
 }
Пример #4
0
 public function checkffduedate()
 {
     $ffinitModel = new Default_Model_Feedforwardinit();
     $ffEmpRatModel = new Default_Model_Feedforwardemployeeratings();
     $ffDataArr = $ffinitModel->getFFbyBUDept('', 'yes');
     $current_day = new DateTime('now');
     $current_day->sub(new DateInterval('P1D'));
     if (!empty($ffDataArr)) {
         foreach ($ffDataArr as $ffval) {
             if ($ffval['status'] == 1) {
                 if ($ffval['ff_due_date']) {
                     $due_date = new DateTime($ffval['ff_due_date']);
                 } else {
                     $due_date = '';
                 }
                 $ffEmpsStatusData = $ffEmpRatModel->getEmpsFFStatus($ffval['id'], 'cron');
                 if (!empty($ffEmpsStatusData)) {
                     foreach ($ffEmpsStatusData as $empval) {
                         if ($empval['ff_status'] != APP_COMPLETED) {
                             $interval = $current_day->diff($due_date);
                             $interval->format('%d');
                             $interval = $interval->days;
                             if ($interval <= 1) {
                                 $optionArr = array('subject' => 'Feed Forward Pending', 'header' => 'Feed Forward', 'toemail' => $empval['userfullname'], 'toname' => $empval['emailaddress'], 'message' => 'Dear ' . $empval['userfullname'] . ', feed forward is pending.', 'cron' => 'yes');
                                 sapp_PerformanceHelper::saveCronMail($optionArr);
                             }
                         }
                     }
                 }
             }
         }
     }
 }