public function executePrintFinal() { $this->tanggalCetak = $this->getRequestParameter('time'); $counseling_id = $this->getRequestParameter('counseling_id'); $counseling = CounselingPeer::retrieveByPK($counseling_id); if (!$counseling) { if (SF_ENVIRONMENT == 'dev') { echo 'Counseling Not Found'; } die; } $this->counseling = $counseling; $this->waliKelas = $counseling->toStringEmployee(); $this->academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id')); if (!$this->academic_calendar) { if (SF_ENVIRONMENT == 'dev') { echo 'Academic Calendar Not Found'; } die; } $this->department = $this->academic_calendar->getDepartment(); $this->departmentDetail = $this->department->getThisDepartmentDetail(); $time = $this->getRequestParameter('time'); $time2 = $this->getRequestParameter('time2'); $tgl = $this->getRequestParameter('tgl_cetak'); /* Get Student */ $student_id = $this->getRequestParameter('student_id'); $this->student = StudentPeer::retrieveByPK($student_id); if (!$this->student) { if (SF_ENVIRONMENT == 'dev') { echo 'Student Not Found'; } die; } /* Get StudentAccal */ $this->studentAccal = StudentAccalPeer::getStudentByAccal($this->academic_calendar->getId(), $this->student->getId()); if (!$this->studentAccal) { if (SF_ENVIRONMENT == 'dev') { echo 'Student Accal Not Found'; } die; } /* Get Score Rule */ $this->scoreRule = nilaiRapor::getScoreRuleAkhir($this->academic_calendar->getId(), $counseling->getClassGroup()->getClassTypeId()); if (!$this->scoreRule) { if (SF_ENVIRONMENT == 'dev') { echo 'AccalId => ' . $this->academic_calendar->getId() . '<br />'; echo 'getClassTypeId => ' . $counseling->getClassGroup()->getClassTypeId() . '<br />'; echo 'Score Rule Not Found'; } die; } $this->scoreRuleSubject = nilaiRapor::getScoreRuleSubject($this->scoreRule->getId()); $this->orientation = 'portrait'; $this->papersize = 'a4'; if (SF_ENVIRONMENT != 'dev') { $this->setViewClass('sfDomPDF'); } }